Add wildcard matching mode for directories

Just add a "/" to the end of the search pattern.
Allow consecutive placeholders in pattern matching functions
Simplify "**" pattern matching algorithm