Terminal formatter

Hi, just thought I'd submit this upstream in case you find it worth merging. It's a simple formatter for ANSI terminal escape sequences. I haven't implemented any color approximation/conversion yet so the color scheme is hard-coded for now.