Fix cache directory

Fix bug when create cache dir