Corrected a typo.
Added support for multiple file extensions.  Also pulled code out of global scope.
Merge pull request #3 from xles/fileext

Multiple file extensions