Use g_get_current_dir() to get the current dir. Thanks komunista for reporting this bug.