fix a missing stringio import
fix python 2.5isms