Fix passing file objects to Curl.setopt