Fix _is_cidr and add a test.