Replace deprecated glib function g_basename() with POSIX basename().