ensure target directories exist