Prepare temporary directory