fixed redirect bug

I should probably remove the redirect_trailing_slash function if you think this is a good fix.  It seems couchdb doesn't see the difference with "" and "/" in the rewrites so we get infinite redirect.