fixed error in directory.rb