added check in AnsiStream.ansi_format() for AnsiCodes
fixed tip and motd format strings
fixed readline prompt issue with ansi codes

added AnsiCode.prompt and AnsiStream.ansi_format_prompt to write readline
escape codes around non printable characters