fixes type error for latest python-magic and python 3

Signed-off-by: Kouhei Maeda <mkouhei@palmtb.net>