WDBS: safe check for window.localStorage

Pull request for https://code.google.com/p/selenium/issues/detail?id=7726 .
Wrapping window.localStorage access into try/catch is the whole idea of this commit :)