Escape tmp_dir in regexp, because it won't work under Win32