g_dir_open: added g_return_val_if_fail() to prevent us from calling