separate plugins into discrete commands

Separate plugin types by directory and commands by individual scripts. Support for a command is determined by the presence of a script with an appropriate name. Unfortunately, only a prefix can be used, since extensions are necessary on some platforms.
When you have a big main block like this, just go ahead and put it all in the top level. The `__name__ == '__main__'` construction is so that other code can import functions from this file without running the whole thing, but there are no functions here.