fix selecting flavor due to os.path.split and __import__ using filepath.