Section 48. In cities which accepted chapter three hundred and seventy-three of the acts of nineteen hundred and five, the auditor shall hold office for three years from the date of his election or appointment and until his successor is qualified, unless sooner removed; provided, however, the appointing authority may, by written contract, appoint an auditor for a term not to exceed five years. A person chosen to fill a vacancy shall hold the office until the end of the unexpired term of his predecessor.