simple wrapper for libmagic