Reset working directory on DependencyMapper

I noticed the chdir() was causing trouble in other bundles that used the current working directory, cause it was never reset.