Replace deprecated mime_content_type with finfo. Fixes #228