Every person elected or appointed to an office in said corporation, shall within twenty days after his election or appointment, and before he shall enter upon the duties of his office, take and subscribe the oath of office prescribed for district officers; which may be done before any person authorized by law to administer oaths, or before the Mayor or Recorder of said Town, which oath, with the certificate of the officer administering the same, shall be filed with the Recorder of the Town.