Add sanity checks and don't run the script if they fail.
Add sanity checks and don't run the script if they fail.

The sanity check tests that all the elements the script uses
actually exists.

nibarius/wkhidem