Don't use getcwd in non-copy builds.