Check log and other files differently during appending restart
We need to do different operations on the log file than the other
files, so it makes sense to separate those aspects of its handling,
while calling a common function for those that are common. That will
also prepare to clean up the opening of the log file in Mdrunner, so
we can do it in only one place.
Checked all the offsets were valid before doing any file operations.
Used a bit less preprocessing, too.
Refs #2651
Change-Id: I23cfba550b57d169c021d72618341ff017a3e7de