"Couldn’t create temporary file." error when erasing free space on external disk
My first thought would be that it is a permissions error of some kind…

Either 


the Drive is formatted as NTFS or ExtFS etc
The System doesn't have write permissions to the device itself


For the first, the simplest, if not cheapest solution would be something like Paragon NTFS or ExtFS or Tuxera NTFS

If it is a pure permissions/ownership issue, then for a removable drive the simplest fix would be to set it to 'Ignore Ownership' from the Get Info window. This should be sufficient to allow the system to write to the drive in order to securely erase.