Replace lib and licenses directories on upgrade instead of merging