Better conformance with IPEP 27

Modifies return values so they return the JSON objects described in IPEP 27.  In particular, the 'name' and 'path' fields are made consistent with IPEP 27 when before 'path' was not always correct and both fields were sometimes missing.