eliminated unnecessary cd and failing substitution

Changing the working directory in a sub-subshell
does not change the working directory of the executing
shell.

The substitution was broken for me on _all_ my machines,
so I started looking into the business.
Merge pull request #1775 from marcusmueller/fixupgradetool

fix for failing substition & eliminated unnecessary cd