So I was on the construction set editing something when it crashed as I tried to save the mod. Looking in the file directory, I saw that the mod I was editing had not been saved (it's last "date modified" was yesterday), but instead a .tes file with an abridged version of the mod file name as its prefix was present, with the correct "date modified".
I restarted the computer, went to the directory and found the same thing -- an unsaved mod file and a newly created .tes file. I copied and renamed the .tes file into a .esp file and opened it, and it loaded fine, presenting me with a complete copy of the mod file which I had been working on until the crash, with the new changes saved. I googled a bit, and found that apparently .tes files are like last ditch CS save files? Kind of like the "restore" save file which MW gives you when it crashes mid-play sometimes.
So, I ended up just loading the unsaved mod file and re-adding my changes instead of using the newly generated .tes/.esp file. I didn't want to use it (the new file) and find out later down the track that it was somehow technically unstable, and that I'd have to ditch the whole thing.
Are .tes files safe to use? What exactly are they?