Fixed broken mimetype detection during import (#1165)