Cleaned up git path detection.