Added additional checks to make sure localStorage is really supported

Fixes private browsing QUOTA_EXCEEDED_ERR issue in Safari