Bug 884406 - Check that we have a .git directory before copying
Merge pull request #10467 from Rik/unbreak-birch-884406

Bug 884406 - Check that we have a .git directory before copying r=julienw