bugfix -  cd out of website path before rebuilding on loop