Fix cache path initialization and set.

Add null terminator to strings
Return nullptr if string is not set

bug 20894664

Change-Id: I33f5d84d56f6299558f5d8713694e40afc82dd20
2 files changed