create the directories before copy
Merge remote-tracking branch 'upstream/master'