Replace fnmatch.filter