fix previous patch for metadata_dir
Merge pull request #1 from remicollet/master

 fix previous patch for metadata_dir