Added one more ensure-directories-exists. It hasn't really caused any troubles yet, but new version seems to be mroe correct.