CB-5706 convert some of the bash scripts to nodejs (closes #118)