Added directory traversal function for do something on each file
$1 is always the directory and $file the file