Don't directly open the editor before we clean up curses.  Instead, queue it up in the .sh file that we already create.