Here a few tips especially for using in shell scripts:
(cd directory && some-commands)
Go to directory and run commands and return to current directory at the end.
pushd
Put current dir on stack.
popd
Retrieve previously pushed dir from stack and go there.