Better error reporting for invalid ANSI escape sequences