Improve error reporting

- No more single line "node.js:176:9" errors
- No more strange output when error happens on first line due to
  module wrapper function.
- A few tests to check these things
6 files changed