reverting change to codecs.open in test.py since it didn't solve the wide/narrow issue anyway