Fix create and remove cache dir