magic: removed unneeded headers
similarity: added libmagic support to detect non-text documents