cffi interface to libmagic