anchor.diff:  binary_headers_to_string([{Key,Value}|Rest], Results) ->
       binary_headers_to_string(Rest, [{bin_to_string(Key),bin_to_string(Value)}|Results]).
   
  +%% @doc Breaks a file path into a list of sub-directories.
  +%% @spec path_to_sub_dirs(Path::path()) -> [Directories::binary()]
  +%%   path() = binary() | string()
  +path_to_sub_dirs(Path) when is_binary(Path) ->
  +  path_to_sub_dirs(binary_to_list(Path));
  +
  +path_to_sub_dirs(Path) when is_list(Path) ->
  +  PathElements = string:tokens(Path, "/"),
  +  % drop the last element which must be the file name
  +  DirElements = drop_last(PathElements),
  +  dir_elements_to_sub_dirs(DirElements, []).
  +  
  +dir_elements_to_sub_dirs([], Results) ->
  +  Results;
  +dir_elements_to_sub_dirs(DirElements, Results) ->
  +  dir_elements_to_sub_dirs(drop_last(DirElements),
  +                           [list_to_binary(string:join(DirElements, "/"))|Results]).
  +
   %% Private functions
   
   caseless_get_proplist_value(Key, Proplist) when is_list(Key), is_list(Proplist) ->
  
positive.code: binary_headers_to_string_test() ->
    ?assert([{"a","1"},{"b","2"}] == binary_headers_to_string([{"a",<<"1">>},{<<"b">>,"2"}])),
    ok.
    
  -endif.
  
negative.code: 
  filter_undefined(List) when is_list(List) ->
    lists:filter(fun(Entry) -> Entry =/= undefined end, List).
  
  drop_last([]) ->
    [];
  drop_last(List) when is_list(List) ->
    lists:reverse(tl(lists:reverse(List))).
  
  %% Tests
  -ifdef(TEST).
  
  