anchor.diff:  
       Index =
           lists:map(
  -              fun ([A,B,C,[]]) ->
  -                      fmt("['~s','~s','~s',[]]",
  -                        [html_encode(A),html_encode(B),html_encode(C)]);
  -                  ([A,B,C,D]) ->
  -                      fmt("['~s','~s','~s','~s']",
  -                        [html_encode(A),html_encode(B),html_encode(C),html_encode(D)])
  -              end,
  -              lists:sort(fun sort_index/2, lists:map(F, FIndex))),
  +          fun ([A,B,C,[]]) ->
  +                  fmt("['~s','~s','~s',[]]",
  +                      [html_encode(A),html_encode(B),html_encode(C)]);
  +              ([A,B,C,D]) ->
  +                  fmt("['~s','~s','~s','~s']",
  +                      [html_encode(A),html_encode(B),html_encode(C),html_encode(D)])
  +          end,
  +          lists:sort(fun sort_index/2, lists:map(F, FIndex))),
   
       Js = fmt("var index = [~s];",
                [string:join([[C || C <- I, C /= $\n, C /= $\r] || I <- Index], ",")]),
   
  -    ok = file:write_file([dest(Conf), "/erldocs_index.js"], Js).
  +    ok = file:write_file(jname(kf(dest,Conf), "erldocs_index.js"), Js).
   
   render (cref, App, Mod, Xml, Types, Conf) ->
       render(erlref, App, Mod, Xml, Types, Conf);
   
   render (erlref, App, Mod, Xml, Types, Conf) ->
   
  -    File = filename:join([dest(Conf), App, Mod++".html"]),
  -    ok   = filelib:ensure_dir(dname(File) ++ "/"),
  +    File = jname([kf(dest,Conf), App, Mod++".html"]),
  +    ok = filelib:ensure_dir(dname(File) ++ "/"),
   
       Acc = [{ids,[]}, {list,ul}, {functions,[]}, {types,Types}],
   
  
positive.code: 
      AppName = bname(AppDir),
      ?log("Generating XML for application ~s ~p -> ~p", [AppName,AppDir,Dest]),
      case (catch edoc:application(list_to_atom(AppName), AppDir, Opts)) of
          ok ->
              Accr = fun (Filename, Acc) -> [Filename|Acc] end,
              XmlFiles = filelib:fold_files(Dest, ".+\\.xml$", false, Accr, []),
  
negative.code:               add_parents_too(Cwd, lists:reverse(filename:split(Relativer(Dir))))
        end, Dirs).
  add_parents_too (Cwd, [Dirname]) ->
      [jname(Cwd, Dirname)];
  add_parents_too (Cwd, RevExp) ->
      [ jname([Cwd] ++ lists:reverse(RevExp))
        | add_parents_too(Cwd, tl(RevExp))
      ].
  
  gen_docsrc (AppDir, SrcFiles, IncFiles, Dest) ->
      Opts = [ {includes, IncFiles}
             , {sort_functions, false}
             , {file_suffix, ?SPECS_TMP}
             , {preprocess, true}
             , {dir, Dest}
             , {packages, false}  %% Find modules in subfolders of src/
  