Section 16. If the wife so releases her homestead, or so conveys her own estate, the proceeds of the sale may be so invested and disposed of as to secure to her, and to the minor children of the owner if it is an estate of homestead, the same rights in the principal and income thereof as she or they would have had therein if it had not been sold. An agreement made between her and the guardian or conservator for securing and disposing of the proceeds or any part thereof for the purpose aforesaid, if approved by the probate court for the county where the guardian or conservator was appointed, or, in default of such agreement, an order therefor made by the probate court, shall be valid and binding on all persons interested in the granted property or in said proceeds, and may be enforced by the court or by an action at law.