Fix /dev/pts troubles with virtual terminals.