The fold_files/5 function folds the function
Fun over all (regular) files F in the
directory Dir that match the regular expression RegExp.
If Recursive is true all sub-directories to Dir
are processed. The match is tried on just the filename without
the directory part.