Use temporary directory for writing files instead of the root directory.