Fix buffer overflow bug caused by incorrect parameter use.
Fix "JSON inval data" error. Apparently the old keccak miners use an 80 byte data chunk for work whereas the maxcoin version uses the normal 128 byte data chunk.
cleanup; fix perms