gsutil_util: replace `du` with `stat`

`gsutil du PATH` no longer returns an error even if the file does not
exist. Use `gsutil stat` instead.

BUG=chromium:434029
TEST=Manually run the commands using different gsutil versions

Change-Id: I7af64735a2b6dae67fb2b724792c1734da3f3511
Reviewed-on: https://chromium-review.googlesource.com/230305
Tested-by: Yu-Ju Hong <yjhong@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
Commit-Queue: Yu-Ju Hong <yjhong@chromium.org>
diff --git a/gsutil_util.py b/gsutil_util.py
index 709bc64..bf69c10 100644
--- a/gsutil_util.py
+++ b/gsutil_util.py
@@ -126,9 +126,8 @@
   # If the pattern is a glob and contains no wildcards, we'll first attempt to
   # stat the file via du.
   if not (is_regex_pattern or _GlobHasWildcards(pattern)):
-    get_methods.append(('gsutil du %s/%s' % (archive_url, pattern),
-                        'Failed to du on the artifact file.',
-                        pattern))
+    get_methods.append(('gsutil stat %s/%s' % (archive_url, pattern),
+                        'Failed to stat on the artifact file.', pattern))
 
   # The default method is to check the manifest file in the archive directory.
   get_methods.append(('gsutil cat %s/%s' % (archive_url, UPLOADED_LIST),
diff --git a/gsutil_util_unittest.py b/gsutil_util_unittest.py
index 6ac85cd..3071825 100755
--- a/gsutil_util_unittest.py
+++ b/gsutil_util_unittest.py
@@ -109,7 +109,7 @@
     self.mox.StubOutWithMock(gsutil_util, 'GSUtilRun')
 
     # GSUtil cat gs://archive_url_prefix/UPLOADED.
-    gsutil_util.GSUtilRun(mox.StrContains('gsutil du %s/%s' %
+    gsutil_util.GSUtilRun(mox.StrContains('gsutil stat %s/%s' %
                                           (archive_url, pattern)),
                           mox.IgnoreArg()).AndReturn(
                               '%s\n%s' % (mock_data, name))