copy tmp image to dir