more platform-independent build

platform-dependent exec commands replaced with node.js alternatives