On some boxes i've done in the pwk it completely skipped over certain ports mainly port 69 or 79 udp when you ran the scanner. I haven't torn your script apart yet to be able to fix that problem but i'd thought i would let you know about it.
UDP port discovery is usually not very reliable.
This is not related to the script, as nmap does the scanning, but it's probably due to how UDP is designed.
On some boxes i've done in the pwk it completely skipped over certain ports mainly port 69 or 79 udp when you ran the scanner. I haven't torn your script apart yet to be able to fix that problem but i'd thought i would let you know about it.