Move the get-terminal-name to a more appropriate tty-specific file.