terminal.py:  Fixed a bug where you could get an exception if the very first character written to the terminal was a carriage return (self.prev_char was not set in __init__()).