Support for proper test exit status via NPM's test script.

This fixes issues with build systems like Travis passing when one of
the two test phases (server or client) actually failed.