public static function realiseDirectory($path, $mode = 0755, $silent = true)
    {
        if (is_dir($path)) {
            return true;
        }

        try {
            $current_umask = umask(0);
            $success = @mkdir($path, intval($mode, 8), true);
            umask($current_umask);

            return $success;
        } catch (Exception $ex) {
            if ($silent === false) {
                throw new Exception(__('Unable to create path - %s', array($path)));
            }

            return false;
        }
    }