Fix cli/terminal build

Use forked package until code.google.com/p/go.crypto/ssh/terminal gets
*BSD support.
system: add IsSafe for freebsd
system: add SafeTempDir for freebsd