No person elected or appointed to the office of sheriff or coroner shall execute any of the duties of such office before a commission shall have been duly granted to him by the Governor and recorded in the recorder of deeds office, under a penalty of imprisonment for a term not exceeding six months, at the discretion of the court of quarter sessions. Such person shall nevertheless be liable to any person injured by any acts done by him under color of such office.
16 P.S. § 4260