> What's wrong with using File.basename?

On linux, you cannot get the basename of windows-ish files:

# on linux:
File.basename("C:\\path\\to\\file.txt")  # -> gives: "C:\\path\\to\
\file.txt"

Heaven knows I would like to avoid all windows path names, but just
after you write something worthwhile you are told it needs to be able
to run on windows, too.  The point is that it would be nice to know
how to *always* get the basename on any system for any kind of
filename.