Make sure there's one-and-only-one trailing newline.

This works for me to fix https://github.com/dnbert/prm/issues/33.  However, since I created this problem, it'd definitely be worth triple-checking my patch. :-)