Refactored code for generating run all script to module.
Use pushd/popd to go to the right folder to run the script.