Use rename(2).

Provides better consistency in case of a write error to the original
configuration file, the write has to succeed before rename(2) is called.
0.3.9