Fix git root finding code.