PEOPLE and GROUP is a list, not a site. The image needs to be stored in some
location in order to be displayed. My code shows how to upload the image to a
picture library.
I'm not sure your code is correct. To get the User Info list, you should use the
SiteuserInfoList property of the SPWeb object. In any case, your code needs to
be in a location in which it can be executed. Either a Web Part, an application
page, a console application or STSADM extension (to name a few).