added ability to write point cloud to ply