Basename of just about any dev

def _devbase(dev):
    '''
    Basename of just about any dev
    '''
    dev = os.path.realpath(os.path.expandvars(dev))
    dev = os.path.basename(dev)
    return dev