Fixed bug in reduce_chords.py to correctly process chord quality