Fix various rsync patching issues. Do not try the rsync stuff if we know it's a file creation.
Do not try to parse response text for error if content type is binary. When parsing, use unicode instead of str.