introduce testdir for checking if dir, and fix with it filechooser