Section 13. Any officer charged with a duty under the provisions of this act, who shall fail to discharge the same or comply with the requirements thereof, shall, upon conviction, be punishable by a fine not exceeding five hundred dollars, or by imprisonment not exceeding three months, or both, at the discretion of the court.