corrected invalid regex for determining image type

Regex is invalid. Will detect filenames with GIF anywhere in the filename. Regex has been adjusted to only match filenames ending in GIF, JPG, etc.