Cleanup of temporary directory failed (lp:#1309224)

[Original report](https://bugs.launchpad.net/bugs/1309224) created by **Tom Slominski (tomslominski)**
```
After trying to perform an incremental backup of a whole system, the backup
has failed. This happened after trying to backup a large 41GB virtual
machine disk. Doing this took several hours, and then the backup errored.

Duplicity version: 0.6.21-0ubuntu4.2
Python version: 2.7.5-5ubuntu1
OS Distro and version: Ubuntu 13.10
Type of target filesystem: btrfs external hard drive
Last lines of the verbose command line output before and up to the error:

Getting delta of (('VirtualBox VMs', 'Ubuntu', 'Ubuntu.vdi')
/home/tom/VirtualBox VMs/Ubuntu/Ubuntu.vdi reg) and (('VirtualBox VMs',
'Ubuntu', 'Ubuntu.vdi') reg)
M VirtualBox VMs/Ubuntu/Ubuntu.vdi
Selecting /home/tom/VirtualBox VMs/Windows 7 64 bit
Comparing ('VirtualBox VMs', 'Windows 7 64 bit') and ('VirtualBox VMs',
'Windows 7 64 bit')
Getting delta of (('VirtualBox VMs', 'Windows 7 64 bit')
/home/tom/VirtualBox VMs/Windows 7 64 bit dir) and (('VirtualBox VMs',
'Windows 7 64 bit') dir)
A VirtualBox VMs/Windows 7 64 bit
Selecting /home/tom/VirtualBox VMs/Windows 7 64 bit/Logs
Comparing ('VirtualBox VMs', 'Windows 7 64 bit', 'Logs') and ('VirtualBox
VMs', 'Windows 7 64 bit', 'Logs')
Getting delta of (('VirtualBox VMs', 'Windows 7 64 bit', 'Logs')
/home/tom/VirtualBox VMs/Windows 7 64 bit/Logs dir) and (('VirtualBox VMs',
'Windows 7 64 bit', 'Logs') dir)
A VirtualBox VMs/Windows 7 64 bit/Logs
Selecting /home/tom/VirtualBox VMs/Windows 7 64 bit/Logs/VBox.log
Comparing ('VirtualBox VMs', 'Windows 7 64 bit', 'Logs', 'VBox.log') and
('VirtualBox VMs', 'Windows 7 64 bit', 'Logs', 'VBox.log')
Getting delta of (('VirtualBox VMs', 'Windows 7 64 bit', 'Logs',
'VBox.log') /home/tom/VirtualBox VMs/Windows 7 64 bit/Logs/VBox.log reg)
and (('VirtualBox VMs', 'Windows 7 64 bit', 'Logs', 'VBox.log') reg)
M VirtualBox VMs/Windows 7 64 bit/Logs/VBox.log
Selecting /home/tom/VirtualBox VMs/Windows 7 64 bit/Logs/VBox.log.1
Comparing ('VirtualBox VMs', 'Windows 7 64 bit', 'Logs', 'VBox.log.1') and
None
Getting delta of (('VirtualBox VMs', 'Windows 7 64 bit', 'Logs',
'VBox.log.1') /home/tom/VirtualBox VMs/Windows 7 64 bit/Logs/VBox.log.1
reg) and None
A VirtualBox VMs/Windows 7 64 bit/Logs/VBox.log.1
Selecting /home/tom/VirtualBox VMs/Windows 7 64 bit/Logs/VBox.log.2
Comparing ('VirtualBox VMs', 'Windows 7 64 bit', 'Logs', 'VBox.log.2') and
None
Getting delta of (('VirtualBox VMs', 'Windows 7 64 bit', 'Logs',
'VBox.log.2') /home/tom/VirtualBox VMs/Windows 7 64 bit/Logs/VBox.log.2
reg) and None
A VirtualBox VMs/Windows 7 64 bit/Logs/VBox.log.2
Selecting /home/tom/VirtualBox VMs/Windows 7 64 bit/Logs/VBox.log.3
Comparing ('VirtualBox VMs', 'Windows 7 64 bit', 'Logs', 'VBox.log.3') and
None
Getting delta of (('VirtualBox VMs', 'Windows 7 64 bit', 'Logs',
'VBox.log.3') /home/tom/VirtualBox VMs/Windows 7 64 bit/Logs/VBox.log.3
reg) and None
A VirtualBox VMs/Windows 7 64 bit/Logs/VBox.log.3
Selecting /home/tom/VirtualBox VMs/Windows 7 64 bit/Snapshots
Comparing ('VirtualBox VMs', 'Windows 7 64 bit', 'Snapshots') and None
Getting delta of (('VirtualBox VMs', 'Windows 7 64 bit', 'Snapshots')
/home/tom/VirtualBox VMs/Windows 7 64 bit/Snapshots dir) and None
A VirtualBox VMs/Windows 7 64 bit/Snapshots
Selecting /home/tom/VirtualBox VMs/Windows 7 64 bit/Windows 7 64 bit.vbox
Comparing ('VirtualBox VMs', 'Windows 7 64 bit', 'Windows 7 64 bit.vbox')
and ('VirtualBox VMs', 'Windows 7 64 bit', 'Windows 7 64 bit.vbox')
Getting delta of (('VirtualBox VMs', 'Windows 7 64 bit', 'Windows 7 64
bit.vbox') /home/tom/VirtualBox VMs/Windows 7 64 bit/Windows 7 64 bit.vbox
reg) and (('VirtualBox VMs', 'Windows 7 64 bit', 'Windows 7 64 bit.vbox')
reg)
M VirtualBox VMs/Windows 7 64 bit/Windows 7 64 bit.vbox
Selecting /home/tom/VirtualBox VMs/Windows 7 64 bit/Windows 7 64 bit.vbox-
prev
Comparing ('VirtualBox VMs', 'Windows 7 64 bit', 'Windows 7 64 bit.vbox-
prev') and ('VirtualBox VMs', 'Windows 7 64 bit', 'Windows 7 64 bit.vbox-
prev')
Getting delta of (('VirtualBox VMs', 'Windows 7 64 bit', 'Windows 7 64
bit.vbox-prev') /home/tom/VirtualBox VMs/Windows 7 64 bit/Windows 7 64
bit.vbox-prev reg) and (('VirtualBox VMs', 'Windows 7 64 bit', 'Windows 7
64 bit.vbox-prev') reg)
M VirtualBox VMs/Windows 7 64 bit/Windows 7 64 bit.vbox-prev
Selecting /home/tom/VirtualBox VMs/Windows 7 64 bit/Windows 7 64 bit.vdi
Comparing ('VirtualBox VMs', 'Windows 7 64 bit', 'Windows 7 64 bit.vdi')
and ('VirtualBox VMs', 'Windows 7 64 bit', 'Windows 7 64 bit.vdi')
Getting delta of (('VirtualBox VMs', 'Windows 7 64 bit', 'Windows 7 64
bit.vdi') /home/tom/VirtualBox VMs/Windows 7 64 bit/Windows 7 64 bit.vdi
reg) and (('VirtualBox VMs', 'Windows 7 64 bit', 'Windows 7 64 bit.vdi')
reg)
M VirtualBox VMs/Windows 7 64 bit/Windows 7 64 bit.vdi
AsyncScheduler: instantiating at concurrency 0
Registering (mktemp) temporary file /tmp/duplicity-74MS55-tempdir/mktemp-
jbJtS6-3
Releasing lockfile <lockfile.LinkFileLock instance at 0x1818248>
Removing still remembered temporary file
/tmp/duplicity-74MS55-tempdir/mktemp-jbJtS6-3
Removing still remembered temporary file
/tmp/duplicity-74MS55-tempdir/mkstemp-zYZHbk-1
Cleanup of temporary directory /tmp/duplicity-74MS55-tempdir failed - this
is probably a bug.
Traceback (most recent call last):
  File "/usr/bin/duplicity", line 1434, in <module>
    with_tempdir(main)
  File "/usr/bin/duplicity", line 1428, in with_tempdir
    fn()
  File "/usr/bin/duplicity", line 1277, in main
    do_backup(action)
  File "/usr/bin/duplicity", line 1410, in do_backup
    incremental_backup(sig_chain)
  File "/usr/bin/duplicity", line 586, in incremental_backup
    globals.backend)
  File "/usr/bin/duplicity", line 391, in write_multivol
    globals.gpg_profile, globals.volsize)
  File "/usr/lib/python2.7/dist-packages/duplicity/gpg.py", line 324, in
GPGWriteFile
    file = GPGFile(True, path.Path(filename), profile)
  File "/usr/lib/python2.7/dist-packages/duplicity/gpg.py", line 105, in
__init__
    self.logger_fp = tempfile.TemporaryFile( dir=tempdir.default().dir() )
  File "/usr/lib/python2.7/tempfile.py", line 493, in TemporaryFile
    (fd, name) = _mkstemp_inner(dir, prefix, suffix, flags)
  File "/usr/lib/python2.7/tempfile.py", line 239, in _mkstemp_inner
    fd = _os.open(file, flags, 0600)
OSError: [Errno 2] No such file or directory:
'/tmp/duplicity-74MS55-tempdir/tmpqYcXYQ'

Command line input:
duplicity incr --exclude-filelist=/media/tom/Linux\
backups/gazelle/tom/exclude -v 9 /home/tom file:///media/tom/Linux\
backups/gazelle/tom
After that, the backup proceeded as normal.
```

Story points: 16.0