Add code coverage for test script

Update npm dependencies and test script to check code coverage using
coveralls and istanbul
moved chai dependency to devDependencies