A much better approach suggested by @vivien. Also added a notification when cd creates ephemeral directories.