That's the easiest way. If you do want to decode the filename yourself, note the encoded filename is only the last segment of the new filename (i.e., the part after the last "." -- in this case, "73716c2e6c6f67").
newname = ''
for c in filein:
newname = newname + "%x" % (ord(c))