Fix #68: StringIO issues in calibrator.py