setting 0644 permissions on mkstemp file handles. Fixes issue #3857
Merge pull request #3878 from sjahl/apt_repository-perms-fix

setting 0644 permissions on mkstemp file handles. Fixes issue #3857