Fixed curl_dir condition check