I don't know what to say. Sometimes there are easy solutions to seemingly impossible problems.
I can't say how grateful I am for you guys and the seomoz community. You have saved me from having to deal with about 10000 pages that had totally stumped me.
Have a coffee latte on me and thank you.
Alex