fix directory redirect code to be compliant, add test
Merge pull request #259 from mojavelinux/rack-redirect-fix

fix directory redirect code to be compliant, add test