Prevent grandchild from crashing on exception

execute_blocking's grandchild can have an exception thrown after cmd_err_write.close, in which case the rescue block will crash.

This happened to me if the cmd to execute doesn't exist.