When security is taken by the referees on a sale, and the parties interested in the security, by an instrument in writing under their hands delivered to the referees, agree upon the shares and proportions to which they are entitled, or when shares and proportions have been previously adjudged by the court, the securities shall be taken in the names of and payable to the parties entitled thereto, and shall be delivered to such parties upon their receipt therefor. Such agreement and receipt shall be returned and filed with the clerk.