Make sure target directories are created