def collect_directories(glob_pattern, file_pattern='')
      Pathname.glob(glob_pattern).select{|f| f.basename.to_s.include?(file_pattern) }.map(&:dirname).uniq.map(&:realpath)
    end
def collect_directories(glob_pattern, file_pattern='')
      Pathname.glob(glob_pattern).select{|f| f.basename.to_s.include?(file_pattern) }.map(&:dirname).uniq.map(&:realpath)
    end
collects non empty directories and names the metric by the folder name
 parent? or dirname? or basename?