[autotest] Make the diskspace check more robust.

Check to see the path provided to check the diskspace exists and
catch some exceptions that may happen if the du command fails

BUG=chromium:751895
TEST= test_that, trybot job

Change-Id: I132ecbb4c92a61d496a08b22f841d55b00bef8ee
Reviewed-on: https://chromium-review.googlesource.com/601414
Commit-Ready: Keith Haddow <[email protected]>
Tested-by: Keith Haddow <[email protected]>
Reviewed-by: Keith Haddow <[email protected]>
diff --git a/client/common_lib/error.py b/client/common_lib/error.py
index f9babce..faac58f 100644
--- a/client/common_lib/error.py
+++ b/client/common_lib/error.py
@@ -489,6 +489,14 @@
     """Exception raise when a program runs as an illegal user."""
 
 
+class AutoservDirectoryNotFoundError(AutoservHostError):
+    """Exception raised when an expected directory is not found."""
+
+
+class AutoservDiskSizeUnknownError(AutoservHostError):
+    """Exception raised when the disk space could not be determined."""
+
+
 # This MUST remain at the end of the file.
 # Limit 'from error import *' to only import the exception instances.
 for _name, _thing in locals().items():