[libvirt] [sandbox PATCH 1/3] Add an utility function for guessing filetype from file extension