A couple of days ago a found a really neat trick you can use when you are in the terminal window.

cd -

It will move you from the directory you were in to the directory you were in last, typing it again will bring you back to that first directory.