Added some validation code and fixed a bug.

When the start position was 0, the code was still seeking forward until
if found the first instance of line-ending. This caused incomplete
	reads.