Added t6071 - fix a broken update when outputs in other directories are orphaned.

Normally when we steal an output from another command, that command still exists. However, with outputs in other directories, it is possible that the command node was destroyed during a file-system scan (because a directory was removed/renamed), yet the output node still remains with its group link. In this case, when we steal the output, the old group link was hanging around, causing an error when trying to add the "new" group link. We can just check if an orphaned node still has a group link, and remove it if so.

Fixes #178.