Added eachd function for iterating command over dirs