added unit tests for the metadatagenerator
added a check if the dir exists