Safeguard g_file_get_basename() in fm-templates.c as well.