Well I'm sure someone will come along with the code to do it, but since I don't have it right off hand and don't feel like searching for it.

Try this cool little KiXform script written by Chris S.
It will allow you to copy the OU as a string needed by KiX.

KiXforms - Active Directory Browser

It could also be that you have some other invalid code somewhere else in your script.