Change Railtie callback to before_initialize

As mentioned in #70, in Rails 4.1.0.beta1 (and earlier versions?) `Rails.root` is `nil` in `before_configuration`. Changing it to `before_initialize` works nicely.