Fixed writing of whitespace characters in CPF writer.

Fixes #868
2 jobs for issue-868 in 26 minutes and 36 seconds (queued for 6 seconds)