Put all call to create_directories in a common recipe

to avoid resource cloning warning (issue  #172)