AU: prepend TMPDIR when creating a temp file/directory

This changes the behavior of utils::MakeTemp{File,Directory} to prepend
TMPDIR (or /tmp, if not defined) to the given path template. That is,
unless the user provided an absolute path, or a path that is explicitly
relative to the current directory (starts with ./ or ../).

BUG=chromium:253622
TEST=None

Change-Id: Ibe11b279f8f4e9ba97bb2d44867595f76bbf632a
Reviewed-on: https://chromium-review.googlesource.com/182098
Tested-by: Gilad Arnold <garnold@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Commit-Queue: Gilad Arnold <garnold@chromium.org>
diff --git a/omaha_request_action_unittest.cc b/omaha_request_action_unittest.cc
index 428a286..015f396 100644
--- a/omaha_request_action_unittest.cc
+++ b/omaha_request_action_unittest.cc
@@ -1731,7 +1731,7 @@
       "CHROMEOS_IS_POWERWASH_ALLOWED=true\n"
       "CHROMEOS_RELEASE_TRACK=stable-channel\n"));
   OmahaRequestParams params = kDefaultTestParams;
-  params.set_root(string("./") + test_dir);
+  params.set_root(test_dir);
   params.SetLockDown(false);
   params.Init("1.2.3.4", "", 0);
   EXPECT_EQ("canary-channel", params.current_channel());
@@ -1778,7 +1778,7 @@
       test_dir + kStatefulPartition + "/etc/lsb-release",
       "CHROMEOS_RELEASE_TRACK=canary-channel\n"));
   OmahaRequestParams params = kDefaultTestParams;
-  params.set_root(string("./") + test_dir);
+  params.set_root(test_dir);
   params.SetLockDown(false);
   params.Init("5.6.7.8", "", 0);
   EXPECT_EQ("stable-channel", params.current_channel());