Remove the image file when there is an error

When the script experience an error dealing with the uploaded image file (scaling, etc) it should be able to clean out before exiting, that is, unlinking the file to save space.