Adding keepExtensions option

This adds a new boolean option `keepExtensions`. If set, the output will include file extensions instead of stripping them off.