Escape unprintable characters.

Closes #44.