Section 77A. In case of the sale of land acquired by a city or town through foreclosure under any provision of this chapter, the purchaser shall be required as a condition of the sale to authorize the official or officials executing the deed on behalf of the city or town to record the same, and the expense of such recording shall be paid by such purchaser. Such official or officials shall cause such deed to be recorded in the proper registry of deeds within fifteen days after the execution thereof.