Catch localStorage security exceptions. Fixes #351
Merge pull request #472 from drench/351-localStorage-catch

Catch localStorage security exceptions. Fixes #351