(refs #120) URL encode tag name

URL encode tag name URL like branch name.
And rename encodeBranchName to encodeRefName.