Fix race condition in gitdeps.py

The loop to delete orphaned directories uses threading to delete directories
in parallel.  Threads were created from a lambda function, which closed a
variable. The variable was redefined in a loop, which lead to a race condition.

BUG=

Review-Url: https://codereview.chromium.org/2693863004
1 file changed