fix handling of symlinks in pattern (path vs. canonical path)