MULE-7667: File filter not working when recursing on subfolder

Extract this condition outside the for loop by creating the final filter, or may be use a method for getting the resolved filter.