Rails3 compatibility: replace RAILS_ROOT with Rails.root

squashed #261.