Improve script to handle nuget releases