pehash: ssdeep calc; many minor fixes