Handle IOErrors in needs-restarting if the process is already over.
Fix --save when --setopt contains wildcards. BZ 1097297