Add tests for $PWD during enter and leave events