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

For example, `folder.js` -> `folder.js.zip` instead of `folder.zip`.