client, repl: use the correct window.onerror args

Amazingly, the `err` Error instance is NOT passed to the `onerror` callback.
See: https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers.onerror
Merge pull request #17 from TooTallNate/fix/onerror-arguments

client, repl: use the correct window.onerror args