§ 1077. Payment of taxes, assessments and water rates out of proceeds. Where a judgment, rendered in an action for dower directs a sale of the real property, the officer making the sale must, out of the proceeds, unless the judgment otherwise directs, pay all taxes, assessments, and water rates which are liens upon the property sold and redeem the property sold from any sales for unpaid taxes, assessments, or water rates which have not apparently become absolute. The sums necessary to make those payments and redemptions are deemed expenses of the sale.