finds correct tab for selection

hopefully fixes previous troublesome bug where the first tab returned by chrome.tabs.query was not the active tab