Add LockOSThread to pam script

This is to try and ensure that the expensive code runs on the same
thread that has the high priority.