PWM frequency library

if I do a pwmWrite(10, 2000), I get a Duty cycle of 81.6% in this logic analyzer

That's because the acceptable range for pwmWrite() is 0 - 255, or one unsigned 8 bit integer. You are truncating that int many times over with that second parameter and getting a junk duty cycle as a result.
pwmWrite() parameters are meant to mimic analogWrite() parameters. If you need more resolution, use pwmWriteHR(). It is described earlier in this thread.

This fix should solve your frequency issues, I still have no answer for the test program resolution issue. My Mega, my Uno, and Atmel studio simulators have no problem with it.

The latest version of the library as of this post is v .05. You can download it here:
https://code.google.com/p/arduino-pwm-frequency-library/downloads/list