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

- move command argument parsing from build command (was being used
to determine if debug or release) and into BaseCommand.
- change detection of node from matching 'node' exactly to matching
'node' or 'nodejs' at the end of the command path (using path.basename);