Convert 4-space indentation to 2-space indentation for convention compliance
Remove trailing whitespace
Fix 'test' producing log files by placing them in a temporary directory