created and exported  module  that filters a directory by extension type