Write content to a file atomically via a temp file + rename.
Absolute path to the target file.
Content to write.
Retries the rename up to three times on EPERM (Windows file-handle contention) with a 100 ms synchronous delay between attempts.
Write content to a file atomically via a temp file + rename.