Rewrite build/run scripts to use NodeJS