Simplify evaluation of maximum rank
Simplify evaluation of maximum rank

Array of matching path is already rank-sorted.
Also fix typo in pattern string.

pavoljuhas/smart-change-directory,pavoljuhas/smart-change-directory