Fixed check for extension to allow lowercase.