fixed a very subtle bug in the recursive behavior of to_dict. was not playing nice with certain path traversal scenarios. all set now :)