node.js executable is called nodejs in Ubuntu

The if returns false because args[0] is node, but process.execPath is /usr/bin/nodejs under Ubuntu.

Because of a naming conflict with an older package (see https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager#ubuntu-mint-elementary-os), the node executable in Ubuntu is called nodejs.

Work around this issue by removing the extra js at the end of the executable path.