Add print_json_escaped to properly escape json characters

Fixes #19