Create build output in two stages to allow for better atomicity: first save into a temporary directory, then move those files to the final directory