comment() produces json result

- all TAP output is formatted in a single function
- fixes bug with exitCode == 1 upon encountering comments