Make ** pattern eat trailing slash

This allows `foo/**/*.html` to match `foo/file.html`

Fixes #2316