Fixed build_directory script for non-bash users.

``pushd`` and ``popd`` are commands specific to ``bash``. For people like me using other shells, the ``build_directory`` script can't work as is. This makes the script run under ``bash`` regardless of the user's shell. 

@cvan r?