Replace dir separators with dashes before storing into the resolve cache.