Add module_function for (and define) match_by_ext method
Rework matches-files-by-extention block to make use of match_by_ext