Fix a file extension duplication bug

this problem happens when a module name already has a file extension.
a module name with the file extension should be accepted.
see http://wiki.commonjs.org/wiki/Modules/1.1#Module_Identifiers
Merge pull request #1 from OrgaChem/fixDuplicationOfFileExtension

Fix a file extension duplication bug