In case of the violation of an ordinance of the said Town, in which there is a judgment by the Mayor of imprisonment, or for a fine of more than five dollars, an appeal shall lie at the instance of the person against whom such judgment is rendered, to the Circuit Court of Hancock County. Such appeal shall not be granted by the Mayor unless, within ten days from date of judgment, such person shall enter into a recognizance with security deemed sufficient to appear before the said court on the first day of the next term thereof, to answer for the offense against the Town, with which he stands charged, and not thence depart without leave of said court. The provisions of Chapter one hundred and sixty-two of the Code of West Virginia, relating to recognizances in criminal cases, shall be applicable to recognizances contemplated by this section; but any money recovered thereon, or by virtue thereof shall inure to the said Town.