Dir.getwd throws an unknown exception when this plugin is run in a multi-threaded environment. This fix rescues that exceptions and moves on without affecting further changes to the current dir.