File and ImageUploadField fixes

More info in the commit messages. The first two handle file extensions in a friendlier (and less broken) way, the third just makes handling missing `PIL` a little nicer.