Add nice switching between source and build directory to the shell environment.

Authored by zwabel on Oct 7 2012, 3:17 PM.

Description

Add nice switching between source and build directory to the shell environment.

Inspired by the patch from Ivan Shapovalov, but implemented differently to allow
working-directory based symmetric switching.
review: 10650

Details