attachment_name fix

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

attachment_name fix