Escape all strings before writing them to the log file.

This fixes: https://github.com/TheTorProject/ooni-probe/issues/302 for the backend