Add a small wrapper for libmagic