guess documents mimetype

and use the appropriate parser to extract
text from it.

For now this is done by calling `file` via subprocess.
This can be replaced later by methods that use
some python bindings of libmagic directly.