I was missing the starting forward slash from the path. This was causing the error. I changed it to the code below and this resolved the issue.
target.host().performTaskWithPathArgumentsTimeout("/usr/bin/curl", ["http://TEST123/iPhoneTestSupport/Data/RemoveAllData"], 30);