Fix off-by-one error in writeBlocks when not using CRLF

When the newline mode is set to CRLF, this still uses the old behavior,
which commits the buffer one character prematurely to work around the
edge case in which the last character to be output is \n.

With this change, the \r padding is removed from the length check when the
newline mode is LF. However, this introduces a slight side effect in
that writeBlocks is technically a bit too strict, it will force the
n+1th constructor before outputting the first n characters.