Updated for temporary script files on Windows.