Replace deprecated mime_content_type with finfo. Fixes #228
add backward compatibility for mime_content_type for older versions of PHP
close finfo. fix memory leak
Merge pull request #229 from aleemb/master

Replace deprecated mime_content_type with finfo. Fixes #228