script: remove color codes and escaped characters from file