Util: fix BaseName() which should remove the file extension