Each town director of health shall be paid by the treasurer of the town in which he has exercised the duties of his office for his actual services and necessary expenses. Bills for actual services and necessary expenses shall be rendered by each town director of health on the first days of April, July, October and January for the preceding three months. Each city and borough director of health shall receive such compensation as is fixed by the common council or burgesses of the city or borough for which he is appointed, but, if such compensation is not so fixed, he shall receive payment for his actual services and necessary expenses.