anchor.diff:      ArchiveDir = filename:append(Archive, Dir),
       case erl_prim_loader:list_dir(ArchiveDir) of
   	{ok, Files} ->
  -	    IsDir =
  -		fun(RelFile) ->
  -			File = filename:append(ArchiveDir, RelFile),
  -			case erl_prim_loader:read_file_info(File) of
  -			    {ok, #file_info{type = directory}} ->
  -				true;
  -			    _ ->
  -				false
  -			end
  -		end,
  +	    IsDir = fun(RelFile) ->
  +			    File = filename:append(ArchiveDir, RelFile),
  +			    is_dir(File)
  +		    end,
   	    {Dir, lists:filter(IsDir, Files)};
   	_ ->
   	    try_archive_subdirs(Archive, Base, Dirs)
  
positive.code:     Dir = filename:append(BundleDir, Bundle),
      Ebin = filename:append(Dir, "ebin"),
      %% First try with /ebin
      case erl_prim_loader:read_file_info(Ebin) of
  	{ok,#file_info{type=directory}} ->
  	    make_path(BundleDir, Tail, [Ebin|Res]);
  	_ ->
  	    %% Second try with archive
  	    Ext = archive_extension(),
  	    Base = filename:basename(Bundle, Ext),
  
negative.code: do_check_path([], _PathChoice, _ArchiveExt, Acc) -> 
      {ok, lists:reverse(Acc)};
  do_check_path([Dir | Tail], PathChoice, ArchiveExt, Acc) ->
      case is_dir(Dir) of
  	true ->
  	    do_check_path(Tail, PathChoice, ArchiveExt, [Dir | Acc]);
  	false when PathChoice =:= strict ->
  	    %% Be strict. Only use dir as explicitly stated
  	    {error, bad_directory};
  	false when PathChoice =:= relaxed ->
  	    %% Be relaxed
  	    case catch lists:reverse(filename:split(Dir)) of
  		{'EXIT', _} ->
  		    {error, bad_directory};
  		["ebin", App] ->
  		    Dir2 = filename:join([App ++ ArchiveExt, App, "ebin"]),
  		    case is_dir(Dir2) of
  			true ->
  			    do_check_path(Tail, PathChoice, ArchiveExt, [Dir2 | Acc]);
  			false ->
  			    {error, bad_directory}
  		    end;    
  		["ebin", App, OptArchive | RevTop] ->
  