issue #565 fix bug when copying pipeline without modules.
More attempts to fix CellProfiler hanging on close