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.