Correct exit code when test/run fails

Review 1675 by @larkost
JS driver - batchConf -> batch_conf - Related to #2707
Fix for #2359
Merge pull request #2716 from eliangidoni/fix-2359

Fix for #2359 by @eliangidoni
Minor fixes to previous merge (#2359)
Merge branch 'next' into daniel_2657_2