Fix handling of file-size changes.

I got the logic of whether to truncate or copy-tail backwards.

Patch by Samrat Revagade