Add the support for periodic save of a resume rendering file. Add also "safe" save (i.e. save on a temporary name, rename the old file, rename the temporary file).