pep8/pyflakes fixes
fix issue with computing last decendant in NestedTree
respect mailcap commands that expect stdin

This ensures that we respect if a command as specified per mailcap expects its input via stdin and not per tempfile.
This was already done for opening of attachments but not
for interpreting non-text/plain message parts.

fix #584
Merge branch '0.3.4-fix-mailcap-584' into testing