### Summary

ansible-playbook with --connection-password-file or --become-password-file  options fails  with error:

 File "venv/lib/python3.8/site-packages/ansible/cli/__init__.py", line 516, in get_password_from_file
    elif os.path.is_executable(b_pwd_file):
AttributeError: module 'posixpath' has no attribute 'is_executable'


### Issue Type

Bug Report

### Component Name

https://github.com/ansible/ansible/blob/devel/lib/ansible/cli/__init__.py#L543

### Ansible Version

```console
ansible [core 2.12.1]
  config file = ***/ansible/ansible.cfg
  configured module search path = ['.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = ***/ansible/venv/lib/python3.8/site-packages/ansible
  ansible collection location = .ansible/collections:/usr/share/ansible/collections
  executable location = ***/ansible/venv/bin/ansible
  python version = 3.8.6 (default, Nov 20 2020, 18:02:11) [Clang 11.0.0 (clang-1100.0.33.17)]
  jinja version = 2.11.1
  libyaml = False
```


### Configuration

```console
HOST_KEY_CHECKING=False
```


### OS / Environment

Mac OS 11.6.1

### Steps to Reproduce

1. Implement simple playbook ping.yml:
````yaml
- hosts: all
  become: true
  tasks:
  - ping
````
2. Run command ````ansible-playbook -i hosts ping.yml --connection-password-file file````
3. Error occurs

### Expected Results

I expect ansible-playbook command to load password from file.

### Actual Results

```console
ERROR! Unexpected Exception, this is probably a bug: module 'posixpath' has no attribute 'is_executable'
the full traceback was:

Traceback (most recent call last):
  File "***/ansible/venv/bin/ansible-playbook", line 128, in <module>
    exit_code = cli.run()
  File "***/ansible/venv/lib/python3.8/site-packages/ansible/cli/playbook.py", line 114, in run
    (sshpass, becomepass) = self.ask_passwords()
  File "***/ansible/venv/lib/python3.8/site-packages/ansible/cli/__init__.py", line 257, in ask_passwords
    sshpass = CLI.get_password_from_file(op['connection_password_file'])
  File "***/ansible/venv/lib/python3.8/site-packages/ansible/cli/__init__.py", line 516, in get_password_from_file
    elif os.path.is_executable(b_pwd_file):
AttributeError: module 'posixpath' has no attribute 'is_executable'
(venv) ➜  ansible git:(PML-4558-lv-qa-prod-ansible) ✗ ansible --version
ansible [core 2.12.1]
  config file = ***/ansible/ansible.cfg
  configured module search path = ['***/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = ***/ansible/venv/lib/python3.8/site-packages/ansible
  ansible collection location = ***/.ansible/collections:/usr/share/ansible/collections
  executable location = ***/ansible/venv/bin/ansible
  python version = 3.8.6 (default, Nov 20 2020, 18:02:11) [Clang 11.0.0 (clang-1100.0.33.17)]
  jinja version = 2.11.1
  libyaml = False
```


### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct
raise AnsibleError("The password file %s was not found" % pwd_file)
        elif os.path.is_executable(b_pwd_file):
            display.vvvv(u'The password file %s is a script.' % to_text(pwd_file))
            cmd = [b_pwd_file]
            try:
                p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
            except OSError as e:
                raise AnsibleError("Problem occured when trying to run the password script %s (%s)."
                                   " If this is not a script, remove the executable bit from the file." % (pwd_file, e))
            stdout, stderr = p.communicate()
            if p.returncode != 0:
                raise AnsibleError("The password script %s returned an error (rc=%s): %s" % (pwd_file, p.returncode, stderr))
            secret = stdout
        else:
            try:
                f = open(b_pwd_file, "rb")
                secret = f.read().strip()
                f.close()
            except (OSError, IOError) as e:
                raise AnsibleError("Could not read password file %s: %s" % (pwd_file, e))
        secret = secret.strip(b'\r\n')
        if not secret:
            raise AnsibleError('Empty password was provided from file (%s)' % pwd_file)
        return to_unsafe_text(secret)
    @classmethod
    def cli_executor(cls, args=None):
        if args is None:
            args = sys.argv
        try:
            display.debug("starting run")