Fix a bug in the new static root redirect w.r.t. trailing slashes

This fixes a bug where the static middleware did not properly detect that the pathname ended in a slash before sending a redirect for the root mount point.

Fixes visionmedia/express#1789