Fixed inverted logic -- if test fails, script should be injected.