use .tempfile. prefix for temporary file

Siso may open file in the directory to compute digest asynchronously
(e.g. readdir by scandeps), but it may cause error like
 [WinError 32] The process cannot access the file because it is being
used by another process

To prevent from that, siso ignores .tmp file.
https://chromium-review.googlesource.com/c/infra/infra/+/4754997

btw, some user of atomic_outputs requires the same ext as original,
so we can't use .tmp suffix.
Use .tempfile. prefix instead.

Bug: 381947692
Change-Id: I90c607d8e204268528def699de8ad8afb2ae33ef
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6539366
Commit-Queue: Philipp Wollermann <[email protected]>
Reviewed-by: Takuto Ikuta <[email protected]>
Reviewed-by: Philipp Wollermann <[email protected]>
Auto-Submit: Fumitoshi Ukai <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1459258}
diff --git a/build/action_helpers.py b/build/action_helpers.py
index 065a34e..b8b0ae5 100644
--- a/build/action_helpers.py
+++ b/build/action_helpers.py
@@ -38,7 +38,8 @@
   dirname = os.path.dirname(path) or '.'
   os.makedirs(dirname, exist_ok=True)
   with tempfile.NamedTemporaryFile(mode,
-                                   suffix=os.path.basename(path),
+                                   prefix=".tempfile.",
+                                   suffix="." + os.path.basename(path),
                                    dir=dirname,
                                    delete=False) as f:
     try: