/**
  * Get a usable temp directory
  *
  * Adapted from Solar/Dir.php
  * @author Paul M. Jones <*****@*****.**>
  * @license http://opensource.org/licenses/bsd-license.php BSD
  * @link http://solarphp.com/trac/core/browser/trunk/Solar/Dir.php
  *
  * @return string
  */
 public static function tmp()
 {
     static $tmp = null;
     if (!$tmp) {
         $tmp = function_exists('sys_get_temp_dir') ? sys_get_temp_dir() : ESS_IO::_tmp();
         $tmp = rtrim($tmp, DIRECTORY_SEPARATOR);
     }
     return $tmp;
 }