Update directories_controller.rb

altering read_file , using strip