Per : https://ant.apache.org/manual/Tasks/macrodef.html ,
The escape sequence @@ is used to escape @.
This allows @{x} to be placed in the text without substitution of x by using @@{x}.
So try with adding additional '@' prior to getting value of host attribute.
Also you could try setting <property name="token" value="@"/>
and use it withing todir with ${token} to see if that helps