Get request params in middleware

Fixes #67. Without this change, params is empty and http environment variables are not set properly in Rails 3.2.12.