6128: Reverse bug fix keeping code refactor

git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@21577 4ae1f11a-8b86-4847-b8af-ab372f36d1fd
Revert of 215589 because of changes in the GTK package for Win

git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@21581 4ae1f11a-8b86-4847-b8af-ab372f36d1fd
handle CLI pathological case

git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@21584 4ae1f11a-8b86-4847-b8af-ab372f36d1fd