File identifcation library for Python WWW: https://github.com/chriskuehl/identify