Don't set 'user.dir' if the working directory could not be set.