Create expand_ctrl_a() method that expands Ctrl-A attribute codes in a string into ANSI escape sequences.