Make cp calls synchronous (fix by Lubos).