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. But if no such direction be given, all such proceeds and securities shall be paid into court, or deposited as directed by the court.