Made plugin-system work better.

Also ensured that clopt worked in all cases, before realising that it's
functionality is already in the get_opt module.  I'll keep it anyway, I
like it.