Fixed the folder permission bug when creating folder for Cache class.