FS-28: Made sure the temporary files get removed when an upload or update fails.