Made libmagic optional, use libmagic if available
Integrated MagicFile into the File DocumentParser