Metadata dir object encapsulation functions

Change-Id: I640e169138ecf5da24235bf62baad14bbbb400a7
Signed-off-by: Luis Pabon <lpabon@redhat.com>