Fixed extra newlines in pretty print mode.

Fixes #54.