dictionary output now supports nested dictionaries with key paths

with tests!