Improve Embedded Python Support

Discussion:
https://groups.google.com/d/msg/ledger-cli/kq9sKoRX9vw/fmyhvPslzokJ
Fix a bug the caused reconciliation to lock up in an automatic transaction was followed immediately with a virtual transaction on the same account.

This was related to the navigation changes push a while back.
Merge pull request #330 from eliptus/feature/embedded-python

Improve Embedded Python Support
Fix minor navigation bugs.  Prev and next act now properly handle directives and empty lines