Fixed basename to os.path.basename