Add raw copy support (raw=yes), tweak tempfile error message string.
Fixup error reporting.