fixed karma tests and added support for using node install and gulp to run them.