add Remove Unpainted Paths (Active Document)
Remove Unpainted Paths: change name to reflect that this script works on the current selection
Remove Unpainted Paths (Selection): don't decrement index, because selection objects don't get deleted on removal of selected art items