Enable deploy_chrome.py to deploy from a build output directory.

1. Chrome can be deployed directly from an out/[Debug|Release]
   directory.
2. Adds --staging-only option to support running from an ebuild.
3. Adds Chrome utility library - lib/chrome_util.py.
4. Adds on-disk directory structure creation and validation functions to
   cros_test_lib.py

The chromeos-chrome ebuild will eventually call out to this script in
its src_install() step, with --build-dir, --staging-dir, --staging-only,
--gyp-defines, and --staging-flags set.

BUG=chromium-os:35646
TEST=manually, unit tests (not checked in), pylint.

Change-Id: I25bc3f5afc0fd80fd5e664c75cbd3524b9716831
Reviewed-on: https://gerrit.chromium.org/gerrit/36020
Commit-Ready: Ryan Cui <rcui@chromium.org>
Reviewed-by: Ryan Cui <rcui@chromium.org>
Tested-by: Ryan Cui <rcui@chromium.org>
diff --git a/scripts/deploy_chrome_unittest.py b/scripts/deploy_chrome_unittest.py
index 528915a..ab9cb6d 100755
--- a/scripts/deploy_chrome_unittest.py
+++ b/scripts/deploy_chrome_unittest.py
@@ -43,7 +43,7 @@
 
   def testLocalPathSpecified(self):
     """Test case of local path specified."""
-    argv =  list(_REGULAR_TO) + ['--local-path', '/path/to/chrome']
+    argv =  list(_REGULAR_TO) + ['--local-pkg-path', '/path/to/chrome']
     _ParseCommandLine(argv)
 
   def testNoTarget(self):
@@ -99,7 +99,8 @@
 
   def _GetDeployChrome(self):
     options, _ = _ParseCommandLine(list(_REGULAR_TO) + ['--gs-path', _GS_PATH])
-    return deploy_chrome.DeployChrome(options, self.tempdir)
+    return deploy_chrome.DeployChrome(
+        options, self.tempdir, os.path.join(self.tempdir, 'staging'))
 
   def setUp(self):
     self.deploy_mock = DeployChromeMock(self.tempdir)