FilePairReader: flush before unlock!
Truncate on rewind.

Fixes a bug that would happen if the class would write a shorter file.