Fix git related tests

Make tests less fragile by introducing a test git repo