Suggest changing line 92 from;
$output .= "<link>" . $GLOBALS['base_url'] . '/node/' . $product->nid . "</link>\n";
to
$output .= "<link>" . $GLOBALS['base_url'] . '/' . drupal_get_path_alias("node/" . $product->nid) . "</link>\n";
This will use the alias for the product link rather than the normal drupal path (/node/node-id). I believe if aliases are not being used then the normal path will be returned by the function but I have not tested this to be certain.
