Introduce smartBaseName, to handle .XXX.gz and period in filename cleanly
Simplify implementation of smartBaseName
Merge pull request #202 from fvichot/fix-extension-munging

Smarter basename computation