fix segfault in foreman when both the task and the link fail.

Also, upon failure to transfer data we no longer throw away task output,
to aid the user in debugging.
Merge branch 'master' of github.com:cooperative-computing-lab/cctools