##### SUMMARY
When in check mode, the check_file_attrs function is still called. This calls `module.set_fs_attributes_if_different,` which eventually raises an exception in `module.set_mode_if_different` if the file doesn't exist. This situation can occur when running in check mode when the destination file does not yet exist, even if `create` is set to `yes`.

##### ISSUE TYPE
- Bug Report

##### COMPONENT NAME
htpasswd

##### ANSIBLE VERSION
```paste below
ansible 2.8.0
  config file = /Users/matthieu/dev/ansible/ansible.cfg
  configured module search path = ['/Users/matthieu/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/matthieu/.pyenv/versions/3.6.3/envs/ansible/lib/python3.6/site-packages/ansible
  executable location = /Users/matthieu/.pyenv/versions/ansible/bin/ansible
  python version = 3.6.3 (default, Oct  9 2017, 18:08:57) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.37)]
```

##### CONFIGURATION
```paste below
ANSIBLE_PIPELINING(/Users/matthieu/dev/ansible/ansible.cfg) = True
DEFAULT_LOG_PATH(/Users/matthieu/dev/ansible/ansible.cfg) = /Users/matthieu/dev/ansible/ansible.log
DEFAULT_REMOTE_USER(/Users/matthieu/dev/ansible/ansible.cfg) = root
```

##### OS / ENVIRONMENT

From Mac to Linux 16.04


##### STEPS TO REPRODUCE

Run a playbook in check mode that contains this task:

```yaml
- name: Set up basic auth credentials file
  htpasswd:
    create: yes
    crypt_scheme: apr_md5_crypt
    name: "testuser"
    password: "testpass"
    path: "/tmp/thisfiledoesnotexist.htpasswd"
    state: present
```

Please note a very similar bug was already fixed in v2.4 https://github.com/ansible/ansible/issues/32676 
It may be worth to write a test case for this scenario...

##### EXPECTED RESULTS

The check run should complete successfully with a note that the file will be created.

##### ACTUAL RESULTS

I get the following error message:

`[Errno 2] No such file or directory: '/tmp/thisfiledoesnotexist.htpasswd'`

This is what I get when I run ansible-playbook with -vvv:
```
The full traceback is:
WARNING: The below traceback may *not* be related to the actual failure.
  File "/tmp/ansible_htpasswd_payload_b44M9M/__main__.py", line 268, in main
    check_file_attrs(module, changed, msg)
  File "/tmp/ansible_htpasswd_payload_b44M9M/__main__.py", line 192, in check_file_attrs
    if module.set_fs_attributes_if_different(file_args, False):
  File "/tmp/ansible_htpasswd_payload_b44M9M/ansible_htpasswd_payload.zip/ansible/module_utils/basic.py", line 1339, in set_fs_attributes_if_different
    file_args['path'], file_args['mode'], changed, diff, expand
  File "/tmp/ansible_htpasswd_payload_b44M9M/ansible_htpasswd_payload.zip/ansible/module_utils/basic.py", line 1063, in set_mode_if_different
    path_stat = os.lstat(b_path)
```

the same directory can also be found
        :kw cwd: If given, working directory to run the command inside
        :kw use_unsafe_shell: See `args` parameter.  Default False
        :kw prompt_regex: Regex string (not a compiled regex) which can be
            used to detect prompts in the stdout which would otherwise cause
            the execution to hang (especially if no input data is specified)
        :kw environ_update: dictionary to *update* os.environ with
        :kw umask: Umask to be used when running the command. Default None
        :kw encoding: Since we return native strings, on python3 we need to
            know the encoding to use to transform from bytes to text.  If you
            want to always get bytes back, use encoding=None.  The default is
            "utf-8".  This does not affect transformation of strings given as
            args.
        :kw errors: Since we return native strings, on python3 we need to
            transform stdout and stderr from bytes to text.  If the bytes are
            undecodable in the ``encoding`` specified, then use this error
            handler to deal with them.  The default is ``surrogate_or_strict``
            which means that the bytes will be decoded using the
            surrogateescape error handler if available (available on all
            python3 versions we support) otherwise a UnicodeError traceback
            will be raised.  This does not affect transformations of strings
            given as args.
        :kw expand_user_and_vars: When ``use_unsafe_shell=False`` this argument
            dictates whether ``~`` is expanded in paths and environment variables
            are expanded before running the command. When ``True`` a string such as
            ``$SHELL`` will be expanded regardless of escaping. When ``False`` and
            ``use_unsafe_shell=False`` no path or variable expansion will be done.
        :kw pass_fds: When running on Python 3 this argument
            dictates which file descriptors should be passed
            to an underlying ``Popen`` constructor. On Python 2, this will