Don't attempt to remove path extension if the object is a folder.
Merge pull request #5 from lgarron/folder

Don't attempt to remove path extension if the object is a folder.