Enforce directory differentiation using trailing slash.

In bundle server access_rules, some paths are not possible to detect
whether they are files or directories, since they may contain
"$(connection.*)" special variables.  So now we enforce differentiation
between a directory and a file using the trailing slash. If the user
doesn't append a trailing slash then the path is considered a file and
not allowed recursive access.
In access_rules, auto-detect if path is directory...

and append '/' when you know that, so that it's granted access
recursively.  Fix was needed for backwards compatibility.
Merge pull request #1339 from jimis/multi-tenancy

Enforce directory differentiation using trailing slash.