fixes error thrown in firefox

window.localStorage is throwing an error in Firefox 23. Wrapping in a try/catch handler, so it'll fallback to the simulated LocalStorage.