get file mime type by file extension and magic bytes
get mime type of a file. extract from Apache Tika project[http://tika.apache.org/].