system: add SafeTempDir for freebsd