anchor.diff:  	    Base = filename:basename(Bundle, Ext),
   	    Ebin2 = filename:join([BundleDir, Base ++ Ext, Base, "ebin"]),
   	    Ebins = 
  -		case split(Base, "-") of
  -		    [_, _|_] = Toks ->
  -			AppName = join(lists:sublist(Toks, length(Toks)-1),"-"),
  +		case split_base(Base) of
  +		    {AppName,_} ->
   			Ebin3 = filename:join([BundleDir, Base ++ Ext,
   					       AppName, "ebin"]),
   			[Ebin3, Ebin2, Dir];
  
positive.code: 
  create_bundle(FullName, ArchiveExt) ->
      BaseName = filename:basename(FullName, ArchiveExt),
      case split(BaseName, "-") of
  	[_, _|_] = Toks ->
  	    VsnStr = lists:last(Toks),
  	    case vsn_to_num(VsnStr) of
  		{ok, VsnNum} ->
  		    Name = join(lists:sublist(Toks, length(Toks)-1),"-"),
  		    {Name,VsnNum,FullName};
  		false ->
  		    {FullName,[0],FullName}
  
negative.code:     true.
  
  archive_subdirs(AppDir) ->
      Base = filename:basename(AppDir),
      Dirs = case split_base(Base) of
  	       {Name, _} -> [Name, Base];
  	    _ -> [Base]
  	end,
      Ext = archive_extension(),
      try_archive_subdirs(AppDir ++ Ext, Base, Dirs).
  
  try_archive_subdirs(Archive, Base, [Dir | Dirs]) ->
  