Sanity check the uploaded file data

Cleans up vulnerability where any file data would get uploaded and saved.  Checked by ensuring it is a valid image and has the expected dimensions.