Improve WrappedCommand.run to close all fds