Fix incomplete lines in split_logfile

Always move the offset to the end of a line, so that we never loose anything, or parse an incomplete line.
I am not a perl dev, please feel free to correct the code as necessary.