 class Kernel extends EventEmitter
     constructor : (@name, @_dbg, @_path, @_actions) ->
         @store = key_value_store()
-        @_directory = misc.path_split(@_path)?.head
+        {head, tail} = misc.path_split(@_path)
+        @_directory = head
+        @_filename = tail
         @_set_state('off')
         @_identity = misc.uuid()
         @_start_time = new Date() - 0

            return
        @_nbconvert_lock = true
        args = misc.copy(opts.args)
        args.push(@_path)
        nbconvert.nbconvert
            args    : args
            timeout : opts.timeout
            cb      : (err) =>
                delete @_nbconvert_lock
                opts.cb(err)


###

async = require('async')


{EventEmitter} = require('events')
