Don't recurse into run(); just loop

Recursing into run() to continue execution blows out the stack; a loop lets programs have loops that run for literally dozens of iterations! 

Also, get rid of warning about tty.setRawMode deprecation.
These changes are not as extensive as they look - everything just got indented because it's wrapped in a loop now.  Silly whitespace-sensitive diff algorithm..