Replace use of the 'pwd' command with $PWD

Use `$PWD` instead of `$(pwd)`.