anchor.diff:  maybe_return_dir(DR, GetPath) ->
       ?Debug("maybe_return_dir(~p, ~p)", [DR, GetPath]),
       case prim_file:read_file_info([DR, GetPath, "index.yaws"]) of
  -	{ok, _FI} ->
  +	{ok, FI} when FI#file_info.type == regular ->
   	    do_url_type(get(sc), GetPath ++ "index.yaws");
   	_ ->
   	    case prim_file:read_file_info([DR, GetPath, "index.html"]) of
  -		{ok, _FI} ->
  +		{ok, FI} when FI#file_info.type == regular ->
   		    do_url_type(get(sc), GetPath ++ "index.html");
   		_ ->
   		    case file:list_dir([DR, GetPath]) of
  
positive.code: 
  % neither is this entirely correct since the /c/d/ files may exists
  % and in that case we'll deliver em :-(
  
  maybe_return_path_info(SC, Comps, RevFile) ->
      case path_info_split(Comps,[]) of
  
negative.code: 
  
  path_info_split([H|T], Ack) ->
      [$/|RevPath] = lists:reverse(H),
      case suffix_from_rev(RevPath) of
  	[] ->   % shortcut clause, not necessary
  	    path_info_split(T, [H|Ack]);
  	Suff ->
  	    {Type, Mime} = mime_types:t(Suff),
  	    case Type of
  		regular ->
  		    path_info_split(T, [H|Ack]);
  		forbidden ->
  		    {false, forbidden};
  