Improve sample ruleset test.

Make it wait for a specific tab to be ready, rather than any tab, and close tab
when done.
Fix test URL in sample ruleset test.
Merge pull request #752 from jsha/better-sample-ruleset-test

Improve sample ruleset test.