Fix create metadata directory