Fix coverage env variable and coverage output buffer flushing

* Set coverage env variables before mocha requires
* Ensure coverage report output buffer has finished writing before calling `async()`