(a) In counties where, because of the insufficiency of the county jail, or for any other cause, the court may be of opinion that the safekeeping of the inmates may require it, the court may order the immediate removal of inmates to the penitentiary or to the nearest branch prison, at the cost of the state, before the expiration of the time allowed to remove the inmates.
(b) The inmates shall, as soon as possible after conviction, be safely removed and conveyed by the person appointed by the commissioner of correction for that purpose, to the penitentiary, or to one (1) of the branch prisons.