Missing encode() in hashing for symlink handling

Symlinks are encoded with sha256 along a different codepath. This requires an
extra invocation of encode('utf-8')