Added log directory, moved (and changed) free_expr to mem.c.