FileInfo detects file encodings and MIME types using the wonderful Unix `file` command.