Add `-pretty` and `-o` to the `print` command

The `-pretty` option allows to pretty-print the JSON; the `-o FILE` is
for outputting to a file.
This contributes to #216.