Use bracket notation for paths

I switched to using basic bracket notation wherever I saw the path being build. I also added a function to convert dot notation into bracket notation which preserves unicode characters, any embedded quotes, dots and brackets. 

However, that function seems to be getting passed the primary (first-level) property unescaped, so the presence of brackets in the key name (which should also be allowed) breaks it.

Right now this fixes #41