Save state on fast quit
Fix for trailing slash on windows with file.exists
File.exist fix for windows