Handle quitting/exiting differently if invoked as result of being called upon to edit a directory as opposed to being explicitly invoked by user