Change file creation to use Rails.root path