Fix metadatadir

Fixes #182