Buck: Fix source path generation for JGit cell

Due to Buck bug: [1] root cell name is neither preserved nor resolved
in `buck audit classpath --dot` output and thus cannot be passed to
Buck again. Add a hack and help Buck for now until the bug is fixed.

* [1] https://github.com/facebook/buck/issues/656

Change-Id: I5973c1c7d81e51ba882c1f10658237a4c8e6a642
diff --git a/tools/download_all.py b/tools/download_all.py
index 58316ca..e46f48c 100755
--- a/tools/download_all.py
+++ b/tools/download_all.py
@@ -19,6 +19,10 @@
 
 MAIN = ['//tools/eclipse:classpath']
 PAT = re.compile(r'"(//.*?)" -> "//tools:download_file"')
+# TODO(davido): Remove this hack when Buck bug is fixed:
+# https://github.com/facebook/buck/issues/656
+JGIT = re.compile(r'//:ewah|//:jgit|//:junit')
+CELL = '//lib/jgit'
 
 opts = OptionParser()
 opts.add_option('--src', action='store_true')
@@ -31,6 +35,8 @@
   m = PAT.search(line)
   if m:
     n = m.group(1)
+    if JGIT.match(n):
+      n = CELL + n[2:]
     if args.src and n.endswith('__download_bin'):
       n = n[:-13] + 'src'
     targets.add(n)