In all cases where courthouses or jails are insured, and are totally or partially destroyed by fire, windstorms or cyclones, the money realized on said insurance shall not be placed in the general revenue of the county, but the county commission shall order that such funds shall be kept separate and apart, and be placed in a fund which shall be designated and known as a building fund, and that the same shall be used in erecting or repairing said courthouse or jail, or furnishing buildings or premises used for courthouse or jail purposes.