Small optimisation in utils.WriteFile
Small optimisation in utils.WriteFile

Currently we always try to remove the new file, even if the rename
succeeded. This patch tracks the existence of the new file and doesn't
try to remove it if we managed to rename it.

Signed-off-by: Iustin Pop <acf83a5274f31a43af6b914614365999469c1a31@google.com>
Reviewed-by: Guido Trotter <f62ca4d5358bdaeef0e50e57f9f7e231de63727e@google.com>

andir/ganeti,onponomarev/ganeti,apyrgio/snf-ganeti,ganeti/ganeti,leshchevds/ganeti,dimara/ganeti,bitemyapp/ganeti,andir/ganeti,mbakke/ganeti,ganeti-github-testing/ganeti-test-1,leshchevds/ganeti,apyrgio/snf-ganeti,apyrgio/ganeti,grnet/snf-ganeti,dimara/ganeti,andir/ganeti,mbakke/ganeti,bitemyapp/ganeti,yiannist/ganeti,ganeti-github-testing/ganeti-test-1,apyrgio/ganeti,leshchevds/ganeti,grnet/snf-ganeti,yiannist/ganeti,yiannist/ganeti,onponomarev/ganeti,ganeti/ganeti,mbakke/ganeti,ganeti/ganeti