Update remove_reference_nodes.py

For small lists:
toRemove = cmds.ls(lis, type='reference')
list(set(lis) - set(toRemove))

For huge lists and in general:
toRemove = cmds.ls(type='reference')
list(set(lis) - set(toRemove))