Simplify CMake config.
Fix a bug in TempFiles.