Ensure that events on the wire are correctly terminated with a newline

Never send an event without a newline.

Depends on \#8, I'll rebase when/if that gets merged if necessary.