pkcs15-tool: fixed file reading