##### SUMMARY
See #72412.

Fixed by @bcoca's patch https://paste.debian.net/1170589/

##### ISSUE TYPE
- Bug Report

##### COMPONENT NAME
core

##### ANSIBLE VERSION
```paste below
devel
```

##### STEPS TO REPRODUCE
```yaml
- hosts: remote_server
  tasks:
  - copy:
      src: t.yml
      dest: /tmp/t.yml
    delegate_to: localhost
```
Connect to remote server with `root`.

##### EXPECTED RESULTS
Works.

##### ACTUAL RESULTS
```paste below
fatal: [remote-server]: UNREACHABLE! => {"changed": false, "msg": "Failed to create temporary directory.In some cases, you may have been able to authenticate and did not have permissions on the target directory. Consider changing the remote tmp path in ansible.cfg to a path rooted in \"/tmp\", for more error information use -vvv. Failed command was: ( umask 77 && mkdir -p \"` echo /root/.ansible/tmp `\"&& mkdir \"` echo /root/.ansible/tmp/ansible-tmp-1604856819.0247443-194052-180695334418942 `\" && echo ansible-tmp-1604856819.0247443-194052-180695334418942=\"` echo /root/.ansible/tmp/ansible-tmp-1604856819.0247443-194052-180695334418942 `\" ), exited with result 1", "unreachable": true}
```

selector.register(p.stderr, selectors.EVENT_READ)
            become_output = b''
            try:
                while not self.become.check_success(become_output) and not self.become.check_password_prompt(become_output):
                    events = selector.select(self._play_context.timeout)
                    if not events:
                        stdout, stderr = p.communicate()
                        raise AnsibleError('timeout waiting for privilege escalation password prompt:\n' + to_native(become_output))
                    for key, event in events:
                        if key.fileobj == p.stdout:
                            chunk = p.stdout.read()
                        elif key.fileobj == p.stderr:
                            chunk = p.stderr.read()
                    if not chunk:
                        stdout, stderr = p.communicate()
                        raise AnsibleError('privilege output closed while waiting for password prompt:\n' + to_native(become_output))
                    become_output += chunk
            finally:
                selector.close()
            if not self.become.check_success(become_output):
                become_pass = self.become.get_option('become_pass', playcontext=self._play_context)
                p.stdin.write(to_bytes(become_pass, errors='surrogate_or_strict') + b'\n')
            fcntl.fcntl(p.stdout, fcntl.F_SETFL, fcntl.fcntl(p.stdout, fcntl.F_GETFL) & ~os.O_NONBLOCK)
            fcntl.fcntl(p.stderr, fcntl.F_SETFL, fcntl.fcntl(p.stderr, fcntl.F_GETFL) & ~os.O_NONBLOCK)
        display.debug("getting output with communicate()")
        stdout, stderr = p.communicate(in_data)
        display.debug("done communicating")
        display.debug("done with local.exec_command()")
        return (p.returncode, stdout, stderr)
    def put_file(self, in_path, out_path):