file.exists(fn) fails
if "/" is on end of file name. Deleting the trailing slash is thus
required on Windows and it is not harmful on other platforms.dts(name)file.exists(fn) in R should be revised
to be multi-platform safe by writing file.exists(dts(fn)).This version also removes repeated adjacent slashes, so that
"/tmp///paul//test/" becomes "/tmp/paul/test".