Proper cleaning of cache dir during unit tests.