Section 59. Depositions to perpetuate the testimony of witnesses within or without the commonwealth, so that they may be evidence against all persons, may, after public notice, be taken upon a commission issued by the supreme judicial court or the superior court.