change Dir.chdr to use Rails.root