fix handling of symlinks in pattern (path vs. canonical path) (now also on windows)