wrapping mr command to go into a given directory and apply the changes