Protect against localStorage write failures.
Putting this in the right place.
Merge pull request #93 from mikeal/master

Protect against localStorage write failures.