files: always update the stat info when the entire file is written

This fixes https://savannah.gnu.org/bugs/?52519.
1 file changed