bug fixes and better error checking
Merge branch 'master' of github.com:jrmerz/node-ckan