added filter method to minimatch

and options optional
Merge pull request #2252 from Bartvds/def/minimatch

added filter method to minimatch