deps log: recover on truncated entry

If a read fails while reading an entry, truncate the log to the last
successfully read entry.  This prevents corruption when a subsequent
run appends another entry.