using pushd and popd instead of cd
updating .gitignore