make sure curses always exits cleanly

no more wonky broken terminals on cat close