fixes #2458 - Directory structure precreated

see http://projects.theforeman.org/issues/2458