Use '\n' instead of ' ' to separate the PNM header from the image data. ppm2tiff needs this to read PNM files written by Sanselan. Also make the use of separator constants more consistent.