Fix cache directory upgrading - do not try to (re)move the active cache dir.

This PR fixes a rather cumbersome issue in the moving of legacy cache directories to their new location.

The current behaviour is trying to move the cache directory into a subdirectoy of itself.

This fix adds a check that skips the removal if the directory to remove is the currently configured cache itself (as it would have to get recreated immediately anyway).