Added pushd/popd to reset to original directory location when finished.