Fixed some bugs in the attribute localStorage implementation.
Added more tests for attribute localStorage.