Fix nil-pointer defer in the case of an HTTP error from the PANDA server.
Make cli build on freebsd
system: add IsSafe for freebsd
system: add SafeTempDir for freebsd