Added support for custom terminal devices

Added support for specifying a custom tty device, which is especially useful for debugging from Eclipse and other IDEs.