Ensure case-insensitive file extension comparison

Ensure that when generating the list of acceptable file extensions, that the list is lower cased, because the extension from the filename will be lower-cased before attempting to find the extension in the list of acceptable extensions.