fix bug in adding directories in checkout.
Merge pull request #2217 from dart-lang/fix_checkout

fix bug in adding directories in checkout.