Don't die if there are no grid tiles.

If there are no grid tiles in the mbtiles file, this script just pukes. Added a conditional to catch this and skip the grid tiles.