added ppm writing for images (not very well tested, could be that it currently only works for quadratic images)
fixed ppm writing