Python bindings for libmagic used to get a description of a
file type, or a mime type for that file.
