Fix issue #102 by extracting file extensions in a more robust way.