The biggest error was that you were actually calling $cmd before it had the point information. You want $cmd to be a simple string of words and numbers until the loop is done. Then you use the eval command to treat the string like it's a command.
Try this:
global proc test(){
string $selList[] = ls -sl
;
string $cmd = "polyCreateFacet -n \"mesh\"";
int $count = particle -q -count $selList[0]
;
for($i=0;$i<$count;$i++){
float $loc[] = `particle -attribute position -id $i -q $selList[0]`;
$cmd += ("-point "+$loc[0]+" "+$loc[1]+" "+$loc[2]);
}
eval $cmd;
}
test();