Modification of the function  ppm_write_to_file that it creates the file for the image

Now the function creates a file for the image and close it. Change the params of this function, now it takes the name of the file instead of the file itself.