Fix file handling in Unix session from GUI