Add get_node helper method to node.rake

As there was a large quantity of repeated code in the node rake tasks, this
commit adds a helper method to get a node from the name environment variable
and to exit with error if the node doesn't exist or can't be found.