You could override the post-command-hook function to check for the folder, then if it doesn't exist, do something else or just kill the buffer.
This article has some insight on how to do that.
Basically overriding the function is redefining the function locally, so you can change it's behavior. This allows you to alter the functionality without having to delve into Emacs source code, recompiling, etc.
Probably the easiest (at least in my opinion) is to C-h f <function-name> RET
, then should show you what elisp file contains that function, so you can get to the source code easily. Once you do that, you should be able to add a command or function call to do what you wish (i.e. close a buffer or save elsewhere). I don't have evil installed, but this is an example of looking at C-h f load-theme RET
:
load-theme is an interactive compiled Lisp function in 'custom.el'
So now you know that the function you're looking for is in custom.el (in my example.)
Here is the GNU page on hooks, which is what you're effectively creating.