Ensure mkdir before file copy.