Added iteration block to directory.rb