Dump PnatomJS variables into files

I need a way to write content of Phantom's browser variables into files. I using codebase instrumented by istanbul (JS code coverage tool) it writes coverage report into global variable in Phantom's browser environment. All I want is to serialize content of that variable and write it into some file.

For example
```
istanbul instrument --variable __coverage__ --output instrumented-test --no-compact test
mocha-phantomjs -d __coverage__=./coverage_report.json instrumented-test/page.html
istanbul report html ./coverage_report.json
```