Use getItem/setItem instead of property access

Although the values can be set and read using the standard JavaScript property access method, using the getItem and setItem methods is recommended. Also IE doesn't enforce localStorage quotas when setting values via bracket notation, so we can't handle errors during saving data when use property access method.