WDBS: safe check for window.localStorage

Pull request for https://code.google.com/p/selenium/issues/detail?id=7726 .
I still get exception in Chrome even with `!!`:
```
>  document.location.href
<  "about:blank"
>  var foo = window.localStorage;
<  Uncaught DOMException: Failed to read the 'localStorage' property from 'Window': Access is denied for this document. VM277:2
```