Fix problems with the load() util used in tests

This works by emulating readFileSync by making a synchronous XHR.