app: port file magic checking to GIO