Update and initialize temporary directories for applications
Update master on mac branch