Move chown ahead of mkdir to avoid known bug