opennhrp-script: update certificate check to do locking
opennhrp-script: update certificate check to do locking

peer-registration hook is executed asynchronously, so the script
needs to take care of locking.

ibazzi/opennhrp,ibazzi/opennhrp,ibazzi/opennhrp