Adjust JS test build to work without installation

The build process for the JavaScript tests relied on the system being
installed in order to resolve paths appropriately. Now the tests can be
run locally.

Note that Travis passes again with this change.