Writing a blend file to a path that references a directory wasn't being handled correctly. When the save "versions" was greater than zero the directory would be renamed (adding a 1), otherwise there would be a "Version backup failed" error. Resolve by exiting with an error in the unlikely event the user saves over a directory. Part of a fix for #134101. Ref !134384