better temp file handling; add a new util to simply handle temp files; update schema; fixes #54