fixing dump/load to not do everything in memory

As-is, the model load/dump functions will run out of memory for large tables, which makes it not very useful for non-trivial tables.