Print errors and make JSON output indented

As I'm not entirely used to the MBean world, the fact that there was no error printing at all was not so helpful :-)

In addition, the output was rather cryptic until I added some indentation. I've tested against Zabbix 2.2, and the indended/prettyprinted JSON is still accepted and used correctly.