Do not copy package inplace.

Use a temporary directory for the copy, so that packages appear atomically.
Comment the old inplace code, and add a mkdir in front of it to make sure the
destination always exist.