Detect incomplete records; clean up code

Make use of itertools.izip_longest to iterate over the file 4 lines at a time.
If an incommplete record is found at the end of the file, raise an error.
Add test/data with an incomplete record

Fixes #398