When applying raw (no gzip) patches, `mbtiles` was trying to un-gzip them first. Now handles it properly. Also adds a number of tests to catch these cases.