Use base64 instead of utf-8 for icon cache hash

With utf-8 we'd see errors like:

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc4 in position 10:
ordinal not in range(128)

with certain files containing non-ASCII characters. Changing the
encoding to base64 has fixed the issue with these files.