blockwrite.lua and makeflat.lua initial commit