Add a better check for whether mocha is running from the command line

The existing check misses cases where blanket is being require()'d from a relative path, e.g. ../node_modules/blanket, as it only tests for an argument matching "blanket".

This patch makes the test more robust in this situation.