Add file type case insensitive.

File extensions should be compared with case insensitive. So I add toLowerCase() function to both file name and its valid types.