Fix for SCREENSHOT_PATH env variable on MacOS.

@kenyee Perhaps you could do it for Windows. I can't test that. This seems to work fine on MacOS.