Supports multiple js files in main. Works with outlayer

I added support for a `main` setting with multiple javascript files. See http://github.com/metafizzy/outlayer for the dependency that was failing.