Add support for auto background persistence to a file

Adds a watcher to the atom that checks if it needs to persist, and
sends off to an agent if so. The agent pretty-prints to a file.