Give the mock localStorage some methods.