Image validation case insensitive.

Validation for images were case sensitive. Changed that now, so files named '.JPG ' can also be uploaded as '.jpg' files.

Also updated some comments...