Error handling

* aligned error handling to node.js conventions (https://www.joyent.com/developers/node/design/errors)
* aligned package.json to https://www.npmjs.org/doc/files/package.json.html#bugs
* it's a backwards-incompatible change - bumping major version