Fix mixed up basename and filename

Mixed up these concepts before.

The filename is and should be the farthest element from the root in
the directory hierarchy. The filename may or may not contain a
filename extension.

The basename is and should be the filename without the filename
extension. The basename is the name of the file.