Whenever a mortgagor fails to pay when due any taxes, assessments, interest on prior mortgages, insurance premiums or other charges necessary to be paid for the protection of the lien of a mortgagee, the mortgagee may pay the same, and such payments shall be added to the mortgage debt and secured by the mortgage held by the mortgagee, and shall bear interest at the same rate as specified in the mo