(a) When any house of correction has been erected as provided for in § 12-41-302, all persons who shall be convicted of petit larceny or any other crime cognizable before justices of the peace, and sentenced to imprisonment, shall be sentenced to confinement in the house of correction instead of the county jail.
(b) All persons then confined in the county jail for the crime of petit larceny or for any other crime cognizable before justices of the peace shall be transferred by order of the county court to the house of correction.