I'm not sure what will os.path.basename do in windows enviroment. You know, it can split by '\' not by '/' maybe we can use npath.basename instead. I will leave it on you.