Write intermediate files by writing a temporary file first
Write intermediate files by writing a temporary file first

Otherwise, we have a race condition: the file exists, so make can
proceed, but its contents are not right yet.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=36398
Reviewed-by: Xavier Claessens <6f61b6f8ca6f7cbeae6bb087ddf85cf85dce43eb@collabora.co.uk>

Distrotech/telepathy-glib,Distrotech/telepathy-glib,Distrotech/telepathy-glib,Distrotech/telepathy-glib,Distrotech/telepathy-glib