sync_chrome: Make directories as non-root user.

After osutils.SafeMakedirsNonRoot is hardened to try to create non-root
directories under various root owned paths (e.g.: by CL:404152).
sync_chrome might decide to clobber the chrome checkout if it is
inaccessible because a prefix of the path is owned by root. In that
case, *NonRoot variant to successfully fix the path ownership.

BUG=chromium:658504
TEST=pre-cq, factory branches can finally build...

Change-Id: I11018fed2bec6c5f17ec432c90ef81119cdcf022
Reviewed-on: https://chromium-review.googlesource.com/410285
Commit-Ready: YH Lin <yueherngl@chromium.org>
Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
Reviewed-by: YH Lin <yueherngl@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
diff --git a/scripts/sync_chrome.py b/scripts/sync_chrome.py
index 73d993f..c0cf7fb 100644
--- a/scripts/sync_chrome.py
+++ b/scripts/sync_chrome.py
@@ -68,7 +68,7 @@
     # If we have an error resetting, or syncing, we clobber, and fresh sync.
     logging.warning('Chrome checkout appears corrupt. Clobbering.')
     osutils.RmDir(options.chrome_root, ignore_missing=True, sudo=True)
-    osutils.SafeMakedirs(options.chrome_root)
+    osutils.SafeMakedirsNonRoot(options.chrome_root)
     SyncChrome(gclient_path, options)
 
   return 0