removes directory matches