Fix build_exclude_hashes fails: UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 2244: character maps to <undefined>