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.
Merge pull request #1 from jdost/patch-1

Sanity check the uploaded file data