Improve file name comparison

Resolve symlinks before file name comparison.