Unload ofile before linking (Fix #10216)

Use an unlinked original file object (i.e. a proxy) for linking the stdout and
stderr. The files were previously being uploaded, just linked. This is likely
a result of the files being modified on save to calculate the sha1, but is not
directly an FS issue.

This also seems to fix the exception on batch export (see #10266),
though it's unclear why the two should be connected unless OMERO.web
was complaining about the stdout and/or stderr not being present.

/cc @will-moore, @pwalczysko