Created mock local storage

Standard Jasmine spies caused strange behaviour on localStorage, so a
mock one with basic functionality seemed better.

As a bonus, I suspect this makes the tests run faster.