A function to get file mime-types with curl.