The bashism of this week can be of some help, but for most needs, the cd utility is more than enough.
pushd, popd, and the extra built-in dirs are bashisms that allow one to create and manipulate a stack of directory entries. For a simple, temporary, switch of directories the following code is portable as far as POSIX:2001 is concerned:
cd /some/directory touch some files unlink others # etc cd - >/dev/null # We are now back at where we were before the first 'cd'
Which is equivalent to the following, also portable, code:
cd /some/directory touch some files unlink others # etc cd "$OLDPWD" # We are now back at where we were before the first 'cd'
Multiple switches can also be implemented portably without storing the name of the directories in variables at the expense of using subshells (and their side-effects).
However, if you think you can solve your problem more conveniently by using "pushd" and "popd" don't forget to document the need of those built-ins and to adjust the shebang of your script to that of a shell that implements them, such as bash.