Fix #86: StringIO issues in calibrator.py