Fix minor bugs.

If the cache directory has not been created yet, do not attempt to
iterate through it and delete files. Fix typo that was clearing
AvatarImageResourceId incorrectly in CardData.

Change-Id: I8de8435b96833b3ec841a6e4e55b0e7c6208eae4