Restore previous working directory HACK!