collect(): *reduce* overhead, take care for errors..
This function did yet not take care for output errors, practically
speaking. Change this, quick.
Also try to reduce overhead by not going all the expensive way
through the MIME layers for the output file that collects the
result AND standard output IN ADDITION, but try to reuse the
output that has been produced for the former instead.
This is work in progress and can be improved, but at least
we enter the very expensive MIME stuff for the headers once
only already (very basically speaking).