Purification of phosphorus