work on windows.

tempname() include backslash on windows. so it should convert to slash before calling escape().