Guess media type for a file or a URL