Better handling for the cache directory existence, resolves #62