fixed bug where reader failed with bad linebreak format, added tests