Fix #518 by replacing removed line breaks with whitespace.

Fix issue #518 by, instead of completely removing blank lines, replacing them with whitespace (one space character).