In actions for the recovery of a penalty before a justice, it shall be no cause of exception that the justice resides or has property within the town in which the offense was committed, nor that the penalty or any part thereof may belong to the town.