Police in South Carolina are investigating after a teenager escaped from custody while being taken into a jail for booking.