Updates for the rewrite middleware.
Merge pull request #130 from mailgun/roman/rewrite

Updates for the rewrite middleware