Fix guess_encoding()

Turns out commit 7a9da3b0f obliterated a difference that mattered - the
different argument to magic.open() in guess_mimetype() and guess_encoding()

This commit reinstates that difference, and has a correct use of the pip
python-magic library to get the encoding.
Merge branch '0.3.4-fix-magic-again-602' into testing