util.detect_encoding(): Continues loop if encoding is None.

Closes chfoo/wpull#96