wvtest.sh: declare non-global variables to be local.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
wvtest.sh: print a backtrace on failure when running under bash.

Very handy when there are nested WV* calls, i.e.

  foo() { ... WVPASS bar; ... }
  ...
  WVPASS foo

Signed-off-by: Rob Browning <rlb@defaultvalue.org>