anchored regex index fix

If you use "." in path, which is then processed with regex, the "."
character is interpreted as "any character" and the regex is no longer
left-anchored
(http://docs.mongodb.org/manual/reference/operator/regex/)
, which renders the index unusable, and queries for collections with
more than 100k documents are very slow. Replacing path separator with
"#" solves this problem.