attachment_name fix

foldr should be foldl or else wh_util:is_empty(A) is always false