output(...) now returns an Err(...) if it fails to parse a line.
Added tests of some of the handle_command(...) functionality.