environment variable bug fix (cwd is not the right way to get script location), corresponding bug fix in gui_tkinter