Issue #2219265 by WillowDigit, Devin Carlson: Added additional checks for invalid file extensions.