Make sure call CurlFile::Exists with url path ends with slash for ftp dir.