fix removed dirname() in createCacheDir
unit tests exists() - check cache expiration