get-template-library: fix handling of branch name ending with -n