test and fixed:

error for files with zero bytes,
error for files with 1 hash level (no inner nodes)
test not cleaned up after fail