Ignore ANSI escapes when doing line trimming

Strip all ANSI escape sequences when determining line length.
 * If the result is long enough to be trimmed, use a trimmed version
   of the stripped line.
 * If the result does not need tirmming, use the line as-is.

Closes #31