Fix FileDialog showing elongated path on Mac

* On Mac FileDialog.setFileName(name) will append the full path to the existing one