Replaced mktemp with alternative temp file generation based on secure randoms in order to avoid owner-restricted permission issues with mktemp files
Added cleanup of temp file if error or keyboard interrupt occurs during transfer.
cleanup
Revert "cleanup"

This reverts commit 701a66413d47fc34aec9269dbf0bb19fb28e4359.
Revert "Replaced mktemp with alternative temp file generation based on secure randoms in order to avoid owner-restricted permission issues with mktemp files"

This reverts commit 640a88575a3f637ecdf6b6f677913020129aca04.
Set permission on copied file based on umask.
Updated references to temp file in exception handlers
Merge pull request #136 from tjasond/master

mktemp permission issue, fix