Fix test failures

Merged in the changes from @viveksjain and fixed any test failures that came up.
`$('.torrent.active')` just checks if there are *any* active (i.e. highlighted) torrents on the page. But the one that you right clicked on might not be the one that is currently active.