                     fname = input.slice(j+3)
                 else
                     j = input.indexOf('/../')
-                    fname = input.slice(j+1)
+                    if j != -1
+                        fname = input.slice(j+1)
+                    else
+                        fname = input
                 if @path != './'
                     input = @path + '/' + fname
                 else

                    opts.cb(output.stderr); return
                s = output.stdout
                i = s.indexOf('\nInput:')
                input = s.slice(i+8, s.indexOf('\n',i+3))

                # normalize path to be relative to project home
                j = input.indexOf('/./')

class Slideshow extends FileEditor
    constructor: (@editor, @filename, content, opts) ->
        opts = @opts = defaults opts,{}
        @element = $("<div>Salvus slideshow not implemented yet.</div>")
