port tcgetattr; move ioctl inside termios.go