Fixed pushing and popping into dirs, as well as typos in master and slave configuration scripts.