I'm pretty sure you can't get out of the situation by deleting files, etc.
The only way I know to "cheat death" is to make a backup copy of the character's folder.
Then you can go back and start from that saved point.
Just roll with the situation, and like you already said, you've learned something and will know better next time.
Permadeath is, of course, one of the hallmarks of roguelike games!