*8876* code coverage

Code coverage report. This works for local installs. I will add the Travis integration separately.
Michael, could you try adapting this to use the CommandLineTool parent class as per other PHP command-line tools? It's got bootstrapping and a few sanity checks built in e.g. to prevent requests via the web.