Allow for continual monitoring of a running process

Write to file on each update of stats so that you can run `view` against a `run` process which is running and see the stats update by refreshing the page.

This *might* cause issues by doing a lot of file writes if the child process emits a lot of message events, but in my (limited!) experience it only seems to emit every few seconds so shouldn't be a problem. You might have seen different.