Better handling of files with incomplete data

If Labview crashes and the length of the last segment is not set,
still read the data from all the other segments and return a usable
file, just without the last segment.

It should be possible to read whatever data has been written to the last
segment but for now just ignore it, which is much better than crashing
and making the whole file unusable.