fix (build): move command argument parsing out of build commands

- separate debug and release commands and make them call a standard
build interface
- move command argument parsing from build command (was being used to
determine if debug or release) and into commands.js
- change detection of node from matching 'node' exactly to matching
'node' or 'nodejs' at the end of the command path (using path.basename);