Fix issue #31 by catching UnicodeDecodeError as well