use push/pop instead of cd so we end up in the same place when the script's done >> master