do a deep copy of ret. Don't alter original
Remove old option to pass in pkg names
remove unneeded quotes
Merge pull request #5174 from UtahDave/develop

Fix list_pkgs on Windows.