r and p must be positive

SIGFPE with wrong parameters due to divide-by-zero. Can be caused with a valid-looking MCF.

These parameters are required to be positive by scrypt.pdf.