fixed a NullReferenceException on TilesetBuilder export

closes #4506