WDBS: safe check for window.localStorage

Pull request for https://code.google.com/p/selenium/issues/detail?id=7726 .
Isn't the try…catch unnecessary?