The internal logic for this operator has become broken over time.
- Relative paths could expand using, then be made relative
using the blend file - but only for directories (not files).
- A trailing slash was added for directories (noted as important),
but then ignored when the relative option was disabled.
Simplify the logic here:
- Use the same relative path logic for all paths.
- Add the trailing slash for the directory based on the RNA type
instead of checking if the underlying path is a directory.
- Remove the logic that stripped the file-name off non-directories
since the file selector doesn't allow a filename to be set
when selecting a directory.