Issue #1472378 by elliotttf, Dave Reid: Fixed DrupalRemoteStreamWrapper::getMimeType() should be only looking at the path of the file and exclude any query strings or fragments.
Remove the file_save() call from remote_stream_wrapper_file_create_by_uri() so that other modules can alter the $file object before calling file_save() themselves.