Started working on getting tab completion to work.

Currently it does work but there is an extra space. This is due to the
tab being printed. At the moment sending a backspace does not remove a
character if the input buffer of the terminal is empty. This is a bug
and a holdover from when the terminal did all the buffering. After that
bug is corrected this should work correctly.