Replace deprecated g_basename with g_path_get_basename.

gchar breaks coding style as char is used everywhere else in the code.