Temp Dir

Implemented the temp saving. Only problem is that there is no automated deletion of the tmp files.