### Summary

```sh
ansible-galaxy install -r requirements.yml
```
doesn't work when pointing at a collection root directory
```yaml
collections:
- name: widespot.group_yaml_inventory
  source: ../
  type: dir
```
I get an error
> ERROR! Unexpected Exception, this is probably a bug: [Errno 2] No such file or directory: b'../ansible-group-yaml-inventory/est/README.md'

but it works with a build phase, and later pointing at the tarball
```
ansible-galaxy collection build --output-path ../build ../
```
```yaml
collections:
- name: widespot.group_yaml_inventory
  source: ../build/widespot-group_yaml_inventory-0.1.1.tar.gz
  type: file
```


### Issue Type

Bug Report

### Component Name

ansible-galaxy

### Ansible Version

```console
$ ansible --version
ansible [core 2.13.1]
  config file = /Users/raphaeljoie/Workspace/github.com/widespot/ansible-group-yaml-inventory/test/ansible.cfg
  configured module search path = ['/Users/raphaeljoie/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /opt/homebrew/Cellar/ansible/6.0.0/libexec/lib/python3.10/site-packages/ansible
  ansible collection location = /Users/raphaeljoie/.ansible/collections:/usr/share/ansible/collections
  executable location = /opt/homebrew/bin/ansible
  python version = 3.10.5 (main, Jun 23 2022, 17:14:57) [Clang 13.1.6 (clang-1316.0.21.2.5)]
  jinja version = 3.1.2
  libyaml = True
```


### Configuration

```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
DEFAULT_HOST_LIST(/Users/raphaeljoie/Workspace/github.com/widespot/ansible-group-yaml-inventory/test/ansible.cfg) = ['/Users/raphaeljoie/Workspace/github.com/widespot/ansible-group-yaml-inventory/test/inventory.yml']
INVENTORY_ENABLED(/Users/raphaeljoie/Workspace/github.com/widespot/ansible-group-yaml-inventory/test/ansible.cfg) = ['widespot.group_yaml_inventory.group_yaml']
```


### OS / Environment

OSX 12.0.1, on Macbook Silicon M1

### Steps to Reproduce

1. clone [this repo](https://github.com/widespot/ansible-group-yaml-inventory/tree/cfbbd80d276a887027b49d4b0807b116e23b4d92) (mind the commit)
2. `cd test`
3. execute 3 commands listed in `test/README.md` 
    ```sh
    mkdir ../build
    ansible-galaxy collection build --force --output-path ../build ../
    ansible-galaxy install -r --force requirements.yml
    ansible-inventory --list
    ```
    => ✅ working
4. change requirements.yml: uncomment the lines related to directory import
    ```yaml
    #source: ../
    #type: dir
    ```
5.  re-try force install
    ```sh
    ansible-galaxy install -r --force requirements.yml
    ```
    => ❌ fail

## Important investigation note
`ansible-galaxy` build and install seems to generate a `FILES.json` file. 
* When installing via tarball, the paths in that files are ok
* When installing via directory relative path, all the paths in that files are truncated

```
$ cat $HOME/.ansible/collections/ansible_collections/widespot/group_yaml_inventory/FILES.json
...
{
   "name": "lugins/README.md",
   "ftype": "file",
   "chksum_type": "sha256",
   "chksum_sha256": "23e9939164cad964c2338b8059e4d3def72eef9523e32594503efd50960fcae4",
   "format": 1
},
...
```


### Expected Results

I expect install to work with `dir` same as `file` after `install`

### Actual Results

```console
ansible-galaxy [core 2.13.2]
  config file = /Users/raphaeljoie/Workspace/github.com/widespot/ansible-group-yaml-inventory/test/ansible.cfg
  configured module search path = ['/Users/raphaeljoie/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/raphaeljoie/Workspace/github.com/widespot/ansible-group-yaml-inventory/venv/lib/python3.9/site-packages/ansible
  ansible collection location = /Users/raphaeljoie/.ansible/collections:/usr/share/ansible/collections
  executable location = /Users/raphaeljoie/Workspace/github.com/widespot/ansible-group-yaml-inventory/venv/bin/ansible-galaxy
  python version = 3.9.12 (main, May  8 2022, 17:57:49) [Clang 13.1.6 (clang-1316.0.21.2)]
  jinja version = 3.1.2
  libyaml = True
Using /Users/raphaeljoie/Workspace/github.com/widespot/ansible-group-yaml-inventory/test/ansible.cfg as config file
Reading requirement file at '/Users/raphaeljoie/Workspace/github.com/widespot/ansible-group-yaml-inventory/test/requirements.yml'
Starting galaxy collection install process
Found installed collection widespot.group_yaml_inventory:0.1.1 at '/Users/raphaeljoie/.ansible/collections/ansible_collections/widespot/group_yaml_inventory'
Process install dependency map
Starting collection install process
Installing 'widespot.group_yaml_inventory:0.1.1' to '/Users/raphaeljoie/.ansible/collections/ansible_collections/widespot/group_yaml_inventory'
Skipping '../venv' for collection build
Skipping '../.git' for collection build
Skipping '../galaxy.yml' for collection build
ERROR! Unexpected Exception, this is probably a bug: [Errno 2] No such file or directory: b'../est/README.md'
the full traceback was:

Traceback (most recent call last):
  File "/Users/raphaeljoie/Workspace/github.com/widespot/ansible-group-yaml-inventory/venv/lib/python3.9/site-packages/ansible/cli/__init__.py", line 601, in cli_executor
    exit_code = cli.run()
  File "/Users/raphaeljoie/Workspace/github.com/widespot/ansible-group-yaml-inventory/venv/lib/python3.9/site-packages/ansible/cli/galaxy.py", line 647, in run
    return context.CLIARGS['func']()
  File "/Users/raphaeljoie/Workspace/github.com/widespot/ansible-group-yaml-inventory/venv/lib/python3.9/site-packages/ansible/cli/galaxy.py", line 102, in method_wrapper
    return wrapped_method(*args, **kwargs)
  File "/Users/raphaeljoie/Workspace/github.com/widespot/ansible-group-yaml-inventory/venv/lib/python3.9/site-packages/ansible/cli/galaxy.py", line 1297, in execute_install
    self._execute_install_collection(
  File "/Users/raphaeljoie/Workspace/github.com/widespot/ansible-group-yaml-inventory/venv/lib/python3.9/site-packages/ansible/cli/galaxy.py", line 1325, in _execute_install_collection
    install_collections(
  File "/Users/raphaeljoie/Workspace/github.com/widespot/ansible-group-yaml-inventory/venv/lib/python3.9/site-packages/ansible/galaxy/collection/__init__.py", line 745, in install_collections
    install(concrete_coll_pin, output_path, artifacts_manager)
  File "/Users/raphaeljoie/Workspace/github.com/widespot/ansible-group-yaml-inventory/venv/lib/python3.9/site-packages/ansible/galaxy/collection/__init__.py", line 1308, in install
    install_src(collection, b_artifact_path, b_collection_path, artifacts_manager)
  File "/Users/raphaeljoie/Workspace/github.com/widespot/ansible-group-yaml-inventory/venv/lib/python3.9/site-packages/ansible/galaxy/collection/__init__.py", line 1446, in install_src
    collection_output_path = _build_collection_dir(
  File "/Users/raphaeljoie/Workspace/github.com/widespot/ansible-group-yaml-inventory/venv/lib/python3.9/site-packages/ansible/galaxy/collection/__init__.py", line 1234, in _build_collection_dir
    existing_is_exec = os.stat(src_file).st_mode & stat.S_IXUSR
FileNotFoundError: [Errno 2] No such file or directory: b'../est/README.md'
```


### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct
req = {}
        if _is_concrete_artifact_pointer(collection_input) or AnsibleCollectionRef.is_valid_collection_name(collection_input):
            
            req['name'] = collection_input
        elif ':' in collection_input:
            req['name'], _sep, req['version'] = collection_input.partition(':')
            if not req['version']:
                del req['version']
        else:
            if not HAS_PACKAGING:
                raise AnsibleError("Failed to import packaging, check that a supported version is installed")
            try:
                pkg_req = PkgReq(collection_input)
            except Exception as e:
                
                req['name'] = collection_input
            else:
                req['name'] = pkg_req.name
                if pkg_req.specifier:
                    req['version'] = to_text(pkg_req.specifier)
        req['signatures'] = supplemental_signatures
        return cls.from_requirement_dict(req, artifacts_manager)
    @classmethod
    def from_requirement_dict(cls, collection_req, art_mgr, validate_signature_options=True):