tools: Use binary mode for output writing in ndngetfile

Change-Id: I1c7954517b65e81b1e0ab9d336a6c69d76390d17
Refs: #2296
tests: Fix test cases for ImplictSha256DigestComponent

Change-Id: Ibce7419ba8b2607039844e26a64eb554b4568c5c
Refs: #2172