create folders before trying to copy files into them
escape special characters in folder and file names