Fix import of StringIO + add extension to format mapper