cli: Fix incorrect JSON output in exit().