Merge pull request #858 from samaitra/master

Type casting the driver object with JavascriptExecutor
Fix #857
Merge pull request #860 from bootstraponline/857

Fix #857
Fixed uncaught exception which was not allowing execution of  "mochaTest:appiumutils" (mochaTest) task. In server.js the gridRegister.registerNode(args.nodeconfig) was getting executed if args.nodeconfig is not null. In the appiumutils.js it was not set as null.