Detect groonga repository more smartly