I'm sure I fixed this earlier: take the basename of the thing because we're now using the full path name of the file.