Fix browser test suite error messages

Not sure what the formats of all the error types are, but "undefined
undefined" helps no one.
Fix problems with the load() util used in tests

This works by emulating readFileSync by making a synchronous XHR.