I just had a quick look at the script and I agree, it really should be retrieving the correct 5.2.0 package.
I am really at a loss to explain what might be happening here, since it seems that you do have a working PHP executable at /domain.com/cgi-bin/ and the phpinfo() results indicate that the new executable and ini file are being used, but obviously the executable is not the version expected.
Did you follow any other wiki articles before the one you posted? The reason I ask is that there is a wiki article on copying the existing DreamHost PHP install across to your own domain. If you followed those instructions sometime before doing the full compile, it may explain how you ended up with a PHP 5.1.2 executable in your /cgi-bin/ directory.
Save [color=#CC0000]$50[/color] on DreamHost plans using [color=#CC0000]PRICESLASH[/color] promo code (Click for DreamHost promo code details)