tidied up pgm2unicode a bit.