cbuildbot: Preserve chromite/ in CleanUp stage

Since cbuildbot may be running from the target repository, don't delete
chromite out from under the running code.

BUG=chromium:754859
TEST=none

Change-Id: I178f8de52720d470462a289d407caa9a13535989
Reviewed-on: https://chromium-review.googlesource.com/1208369
Commit-Ready: Lann Martin <lannm@chromium.org>
Tested-by: Lann Martin <lannm@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
(cherry picked from commit 8cc2eabce89d49c7da82b12b4cda560d8817bd78)
Reviewed-on: https://chromium-review.googlesource.com/1216882
Reviewed-by: YH Lin <yueherngl@chromium.org>
Commit-Queue: YH Lin <yueherngl@chromium.org>
diff --git a/scripts/cbuildbot.py b/scripts/cbuildbot.py
index f64440e..6c4530b 100644
--- a/scripts/cbuildbot.py
+++ b/scripts/cbuildbot.py
@@ -940,7 +940,8 @@
     _BackupPreviousLog(log_file)
 
   with cros_build_lib.ContextManagerStack() as stack:
-    options.preserve_paths = set()
+    # Preserve chromite; we might be running from there!
+    options.preserve_paths = set(['chromite'])
     if log_file is not None:
       # We don't want the critical section to try to clean up the tee process,
       # so we run Tee (forked off) outside of it. This prevents a deadlock