added optionnal makedir() to filecopy