Fix issue 20: Escape unprintable characters when logging packets