Fixes copy directive so that it doesn't include intermediate dirs.