Since you are getting an error with the temp directory it seems like you may be experiencing a bigger issue within DW and it might not have anything to do with how you are using things. If you have deleted the dat file and continue to have this problem then there might be a corruption of the configuration. If this is the case you will need to follow the instructions listed here to rename the config folder and remove the installed extensions:
Please give this a try to see if it resolves the problems you are experiencing. Let us know how it goes.