Node JS fixes

Fixed window not defined issue
Fixed rendering error to XML document in node.js (added jsdom
dependancy)
Migrated test framework to Mocha and added runtests.sh script
NPM version bump
Distribution downloads and docs updated