Be more careful when saving files.
Be more careful when saving files.

Don't forget to check the status of writing the file. Rename temporary
file to the final one atomically, instead of deleting the target first,
then renaming.

Fixes #491.

vslavik/poedit,c72578/poedit,alexhenrie/poedit,vslavik/poedit,huoxudong125/poedit,huoxudong125/poedit,PKRoma/poedit,dwaynebailey/poedit,c72578/poedit,BenKeyFSI/poedit,alexhenrie/poedit,PatidarWeb/poedit,PatidarWeb/poedit,c72578/poedit,alexhenrie/poedit,dwaynebailey/poedit,huoxudong125/poedit,c72578/poedit,PatidarWeb/poedit,alexhenrie/poedit,babycaseny/poedit,c72578/poedit,dwaynebailey/poedit,BenKeyFSI/poedit,babycaseny/poedit,PKRoma/poedit,vslavik/poedit,nawawi/poedit,PKRoma/poedit,huoxudong125/poedit,vslavik/poedit,babycaseny/poedit,BenKeyFSI/poedit,babycaseny/poedit,huoxudong125/poedit,egoitzro/poedit,PKRoma/poedit,PatidarWeb/poedit,alexhenrie/poedit,babycaseny/poedit,PKRoma/poedit,BenKeyFSI/poedit,PatidarWeb/poedit,egoitzro/poedit,egoitzro/poedit,nawawi/poedit,nawawi/poedit,nawawi/poedit,dwaynebailey/poedit,dwaynebailey/poedit,nawawi/poedit,egoitzro/poedit,egoitzro/poedit,vslavik/poedit,BenKeyFSI/poedit