Where any person is sentenced by a Presidency Magistrate to imprisonment, or is committed to prison for failure to find security to keep the peace or to be of good behavior, the Magistrate shall cause him to be delivered to the Superintendent, together with his warrant.