[VFS-467] Improved the comparison of file names

- remove the trailing slash of the file names before comparing them