Escape line terminators

This is an alternate fix for #21.