fix: url includes bytes in python 3

This patch decodes the ref_hash obtained from subprocess.check_output
so that strings are used to compose the URL rather than bytes.