Support for TileStache's 'portable' layout

This adds support for TileStache's 'portable' directory layout:
http://tilestache.org/doc/#caches

This also corrects grid filenames when writing.