Fix path generation for saving screenshots
Fix compilation with clang