fix save in tools/mapedit, save block only if exists