try to escape json

cron stats commands shows each task command, but there mighe be a command that contains characters that json requires us to be escaped. It looks that we only need to escape ```\``` and ```"```, jsonlint tells me output is valid after this, but python2.6 still complains.
Can you please take a look at this?