adding a test to verify the localStorage is supported

There is a bug on Safari Mac OSX and iOS. If you use the game in private browsing mode it's triggering an error.

QUOTA_EXCEEDED_ERR:DOM Exception 22:An attempt was made to add something to storage...

I've added a test to verify localStorage can be written, inspired from:

http://stackoverflow.com/questions/14555347/html5-localstorage-error-with-safari-quota-exceeded-err-dom-exception-22-an