Check local storage

Hi,

I haven't been active in quite a while so I'm not sure where the action is currently going on... Devel branch or master?

I added a quick check whenever the library does localstorage operations, since localstorage is not supported everywhere.

Cheers