Getting the hang of things.

Hi Richard,

I'm still new to git and github.  I hope these changes are small enough that they stand on their own and can be reviewed and imported as such.  I first made the mistake of committing all of them at once, so please ignore the first three commits... the rest are just the same patch broken up into smaller pieces.

They basically fix bugs I found when developing my first 5 plugins for Windows and Linux.  I will probably flesh things out a little more when I get my hands on a Mac machine.

Thanks,
Michael.