make sure curses always exits cleanly
wrap your IO in a context manager
Merge pull request #1 from cpdean/master

make sure curses always exits cleanly