Ledger: Fix python bindings, add tests, minor clean up

Support for python bindings was fixed in the upstream repository (see https://github.com/ledger/ledger/pull/231).