def filename_from_filepath(filepath):
    """ Strip the path off a filepath to get a filename"""
    try:
        return filepath[filepath.rindex('/')+1:]
    except ValueError:
        return filepath