faft: Allow creating temporary directories that survive a reboot

mkdtemp can set up temporary directories in non-default directories.
Expose that functionality.

BUG=none
TEST=change I5db5950cf4efcb1f4419532b3eda3e6c1e2aed9c successfully
uses this function.

Change-Id: I8c5d2761850c56a41155ab93c559f4132ce0bed3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/autotest/+/2545831
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Brent Peterson <brentpeterson@chromium.org>
Commit-Queue: Patrick Georgi <pgeorgi@chromium.org>
diff --git a/client/cros/faft/rpc_functions.py b/client/cros/faft/rpc_functions.py
index 0515c14..0ae5f28 100644
--- a/client/cros/faft/rpc_functions.py
+++ b/client/cros/faft/rpc_functions.py
@@ -945,9 +945,9 @@
         root_part = self._os_if.get_root_part()
         return self._os_if.get_internal_disk(root_part)
 
-    def create_temp_dir(self, prefix='backup_'):
+    def create_temp_dir(self, prefix='backup_', dir=None):
         """Create a temporary directory and return the path."""
-        return tempfile.mkdtemp(prefix=prefix)
+        return tempfile.mkdtemp(prefix=prefix, dir=dir)
 
     def remove_file(self, file_path):
         """Remove the file."""