Trying temp files
Problems still left...
Fixed so that proper temp files are used
Finished feature use_real_temp_files.