Prevent errors in private browsing mode due to localStorage and sessionStorage

In safari private browsing mode, calls to localStorage and sessionStorage throw:

QUOTA_EXCEEDED_ERR: DOM Exception 22: An attempt was made to add something to storage that exceeded the quota.

This adds a 1 time check for availability and wraps all calls to storage in a conditional.