Add and fix ANSI escape sequences.