test against file data in testVerify()

 - use the signature for a message supplied in the file to test
   checkvalid() as otherwise we are only testing that the implementation
   is consistent with itself (also speeds up the test)
some speed improvements taken from the previous PR

 - use bcpowmod() in expmod() as it is much faster that the recursion
 - reduce duplicate calculations in various methods
Fixed the signing test by matching just the signature against the signature output
Changed some bcmod checks to only check the last digits

when doing a bcmod(?,2) only check the last digit of the value and when doing a bcmod(?,8) check the last three digits. This should speed up the process some and reduce the exposure of timing attacks
Updated the generate script to meet current implementation standard

Changed the setPath function to instead be three functions: one to set the security level to sqrl or qrl, one to set the domain that the client key pair will be generated on (automatically calculates the d= value) and the third to set the rest of the path to the authentication script.