Take screen shot only if browser is opened

Paired with: Chris McMahon
Paired with: Nikolas Everett

For example error message, see [1]:

…
00:01:08.912       undefined method `screenshot' for nil:NilClass
(NoMethodError)
…

1:
https://integration.wikimedia.org/ci/view/BrowserTests/job/browsertests-
CirrusSearch-test2.wikipedia.org-linux-firefox/15/consoleFull

Change-Id: Id66845c38c4e5e31adff0902d00157d8f73c0468