Said board of commissioners are hereby authorized and directed to pay to the proper officers the actual cost in the case where misdemeanor convicts are sentenced to the work detail of said county, and served their term upon said work detail, provided, they are sentenced to said work detail for a period of three months or more.