Compiling with spaces in the path works for me, debugging with spaces does not.
Also, I only get the double icon in the dock on my iMac and not on my Macbook. Coincidentally, the source code editor bug is also only present on the iMac, so I guess there's something wrong with that machine, although it seems rather bizarre that it is only affecting those two functions.
Apart from the iMac being Core 2 Duo based and the Macbook being a Core Duo machine, they both run Mac OS X 10.5.6 and are very similarly configured.