Sorry, but again: this is bullshit -- and please hear me out! I played from the very first version of the game (v.01104) up to the latest version (v.34052), and I've got absolutely no problem whatsoever. Keep blaming it on the devs on the game, but you're wrong. I decrypted the game and checked some of its code (sorry NLT ;-)), it's very well done and I can't see any flaws.
Again (and I know you don't like to hear it): it's the cheat mod that's the problem. The Mod replaces ESSENTIAL game files, and if you install it to the wrong version (which is every other version than v.21022, because it's designed for this version only!) you're literally changing game code, and even if you don't use the cheats, as soon as you save your game you will screw your save game (it will have false/missing states in it!), and most probably carry these false settings up to where you get a bugged game state.
If you use some (online) save game editors and just change your amount of money, you're probably fine! You still can screw your game, but only if you change your money to something beyond something called "total wealth", which takes all your money and all your talismans into account. In some versions (I believe up to version v27 or v30) the allowed "total wealth" was set very low, and because of that talismans stopped spawning. Now you can set your "total wealth" to 99.999.999 and you're probably fine. But other than that you should not to change anything.
And btw: you're pseudo code does nothing to "fix" the game. It basically makes a backup of your save games, delete them, and copy them back but without some subdirectories, which will automatically re-generated by the game every time you start the game. If your save game has false/missing states, you're still screwed.
So, to any Mod and
Dark Coven : PLEASE remove the link to the (very outdated) Cheat mod from the OP, because people won't read the warning and keep breaking their game!