Fix to line lengths covering newlines.

Fixed a bug (in code and tests) where trailing newlines were included in line lengths.
Minor changes to README.