Check that r and p are not zero before dividing by them

These parameters are required to be positive by scrypt.pdf and upstream
checks them before handing them to the scrypt function.
Merge pull request #19 from jvarho/divide-by-zero-fix

r and p must be positive but not verified