fl_util.c: Let fl_save() save to a temporary file and rename on success
fl_util.c: Let fl_save() save to a temporary file and rename on success

This makes fl_save() an atomic operation - either it updates the file on
success or it leaves the file untouched on failure. This also makes sure that
the file is always complete, that is, it is not possible that the file
is transferred before fl_save() has completed writing.

As an added bonus, because an opened file handle always refers to the
same inode, it is not possible for the contents of the file (or more
correctly: inode) to change while it is being transfered.

Tilka/ncdc,Tilka/ncdc,srijan/ncdc,srijan/ncdc,srijan/ncdc