Fix flipped logic for checking whether vault is enabled. Fixes #112.
Refactored plugin validation into a more general method.