insert correct mimetype if it is missing before updating wrong mimetypes

@PVince81 um ... sorry. just saw https://github.com/owncloud/core/pull/9215 but this PR fixes the mimetype update