pretty print json when writing agent_config.json

Fix for https://github.com/SpiderOak/netkes/issues/22.