In the `type` function, if a file is present in the index then it should
also be checked in the bucked via a HEAD call. This allows revng to
successfully start up even if a file in the `index.yml` files has been
deleted on S3.
The detection of directories in S3StorageClient was flawed as it did not
account for files with a suffix. This commit forces the use of a `/` at
the end to guarantee that the matched path is a sub-{file,directory}.