Update node_tools.py

this allows you to use indexed nodes instead of their name. Now both node and socket can be specified by index. If the node or socket evaluates `isnumeric()` to True then it is cast as int.