resolve_symlink(): use a strbuf for internal scratch space