If I read this correctly, you are treating foo.bar.baz.py as an mailpile.plugins.plugin.baz, instead of mailpile.plugins.foo.bar.baz. That feels odd... are you trying to adapt the plugin architecture to match some local naming preferences, or is this a mistake of some sort?