Ensure that stdin is opened with mode 'rb'

This fixes the following error:

    $ echo foo bar | chardetect
    Traceback (most recent call last):
    ...
    TypeError: can't use a bytes pattern on a string-like object