Replacing os.system calls to stty by idiomatic calls to termios in dkb