Added checks in order to guarantee the correct number of bytes being written to the ply file.
Added checks in order to guarantee the correct number of bytes being written to the ply file.

cpvrlab/srtm2ply