Now .wxm files are saved in a .wxm~ file first to prevent data loss.

There currently are three ways I know of to loose the whole contents of the current session on save:
 - Saving a .wxmx file containing a ridiculously large .png image
 - Running out of disk space while saving and
 - (only for wxmx, as I know): pressing the save button after the input from maxima has been read but while wxMaxima is formatting an output cell.

In my case they all won't do this much harm since I never walk very far without using a version control system. But I know how to at least work around a complete data loss in most cases: Saving things in a temp file first and then place a (hopefully) atomic replace command.

This patch makes the .wxmx output logic use such a temp file and adds a few additional lines of documentation.