[GeniGen.py] Factor out fileDialog.