Only remove the extension when extracting basename.
Merge pull request #4 from jelmervdl/master

Fix for files with dots in filenames