Complete functionality of value method

I have not considered the case where a metadata record is accessed with
the value method where a part of the record is an array of hashes. This
commit hopefully completes the value method. This commit also fixes the
tests.

Signed-off-by: Konrad Reiche <konrad.reiche@gmail.com>