download file over ssl connection using curl