remove spurious \n from SysError().
use TSystem::TempFileName(), which uses mkstemp(), instead of tmpnam().

tmpnam() was causing deprecation warnings on OSX 10.9.