Strip ansi codes from prompt before measuring [Issue #493]