Add option 'extension' when using dynamic file object
make existing tests pass

force the extension to be '.js' instead of the default '.min.js'