Fix file copy in environments.