The proceeds of sale and the securities taken by the referees, or any part thereof, must be distributed by them to the persons entitled thereto, whenever the court so directs. In case no direction is given, all of such proceeds and securities must be paid into court, or deposited therein, or as directed by the court.