Fixes GH-142: JSON reporter does not escape stdout correctly. Thanks Nat Pryce.