Fixes bug with duplicate nesting and other oddities in paths.
Adds test for bug setting top-level key.
0.0.2