Any apartment of any jail, prison or almshouse in which any person affected with any infectious, contagious or communicable disease shall have been confined shall be fumigated immediately upon the removal of such person, the fumigation to be done under the direction of the sheriff, chief of police or town marshal or the keeper or manager of the almshouse, in their respective places, and the expense thereof to be paid out of the funds of the county if the institution be a county institution and of the town or city if the institution be a town or city institution.