Refactoring directory.rb using interpolation.