(a) In all cases where any person is convicted of a felony, and sentenced to six (6) years or less, the court, in its discretion, may order the person confined in the county workhouse for the term of the sentence. The trial judge shall have the power to order the removal of the prisoner from the county workhouse to the department of correction whenever, in the judge's opinion, the prisoner is being treated in a brutal or inhuman manner, or when it appears to the judge that the physical condition of the prisoner is such that working on the roads is deleterious to the prisoner's health.
(b) Whenever any prisoner is confined to a county workhouse under provisions of this section, the state shall pay the costs of incarceration of the prisoner in accordance with title 41, chapter 8.