A violation of any of the provisions of this act, by a person having the power of appointment to a position, under him, in either of the departments mentioned in section 1, shall be deemed a misdemeanor and upon conviction thereof in any court of competent jurisdiction shall be punished by a fine of not less than 50 dollars, and not more than 100 dollars, or by imprisonment in the county jail not to exceed 90 days or by both such fine and imprisonment in the discretion of the court.