Properly load files when a window is already open (fixes #1).