fixing infinte loop when trying to get project root in a nested dir in windows