Change copy_dir_ignore to create the base dir as well. Make the code more concise