That all persons confined in the county jail either under sentence of court, for crimes or imprisonment for the non-payment of fines or costs, shall be available to the county commissioners for the purpose of working them upon roads or other public works of the county, and upon the application of any officer duly appointed…