Only restrict filename characters on Windows.