walk through directory trees and apply an action to every file