Enhanced SharedHelpers.prettifyAst to escape '(' and ')' contained in String.