attachment_name fix

foldr should be foldl or else wh_util:is_empty(A) is always false
Merge pull request #191 from lazedo/patch-3

attachment_name fix