Previously it is possible that the same file path is generated when
the function is called consecutively in the same thread.
The problem can be re-produced in Windows. Does not seem to be
re-producible in Linux and Mac.
Fixes#448, #449.
Change-Id: Ia0163492e3494eba00f56f4d356aa1010b9660cc
ImportantFileWriter::WriteFileAtomically uses mkstemp internally,
which set file permission to 0600, which is not what we want.
Update the code to not use mkstemp instead.
Also updated temporary file name logic to include process id in
the name so it can be unique across processes.
Fixes#259
Change-Id: I2d5a375925cf552bc0db5269f409d7522e63fca5