Use STAGING env if set, else localhost

Also added 'failsafe:verify' to make sure the exit code reflects the result of
the tests. Failed tests => exit code not 0.