n_tty: Fix n_tty_write crash when echoing in raw mode

Signed-off-by: kecinzer <kecinzer@gmail.com>