Fix editstate build.

637bac76 added Destruct to disk.NewState.
Merge branch 'ebfe-fix-editstate-build'
Make cli build on freebsd
system: add IsSafe for freebsd
system: add SafeTempDir for freebsd