It seems that `pattern_matches` lacks some considerations required by [Patterns Used for Filename Expansion](http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_13_03) in SUSv4.
For example, `foo/.bar` shall not matched by the pattern `foo/*`.