main-window: use g_file_test instead of opening the file

This is a bit cheaper and more descriptive.
todo: planning update