Fix git repository check to actually work