Update MetadataManager.py

Reset cwd when searching for repository *before* returning from method.
This is currently causing all specified output paths to be relative to the directory of the source file, rather than the cwd of the invocation.