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