Ensure directories are preserved