[PTFM-5184] UA now uses "file" to determine mime type on POSIX systems
  - Various fall back mechanisms are also available
  - Code refactored