wvtest: Update scripts to the version from my repo

The changes are mostly generalization and addition of comments.