Update client.js to use exit codes on Node.js.

This is needed to support Grunt in the client run mode.