Updated strip_color function to work correctly on Python 2.6 again