Janis explained the mechanics well, I'm just not sure if it was clear that
pwd=`pwd`
contains 2 different entities which unfortunately have both been named "pwd":
1) A variable named "pwd"
2) The UNIX tool named "pwd"
We can't change the tool name "pwd" so lets change the variable name "pwd" to
"thisdir" so your command line is then:
thisdir=`pwd`
Hopefully that makes it clear that what you are doing is simply setting a
variable - you are not affecting future results of calling the tool "pwd" and
that variable "thisdir" will have the value returned by THAT call to "pwd" until
you specifically set it to some other value.
Ed.
P.S. And yes you should be using $(pwd) instead of `pwd`.