Use mime.TypeByExtension instead of the local mimeMap

Also makes sure the detected type is never empty (defaults to application/octet-stream)