initial commit, a function that traverses the given folder and finds all files with given extensions