Corrects to_curl for searches containing single quotes

corrects to_curl for searches containing single quotes