testnetify.sh seems rather fragile to me, is it really OK to rewrite files that npm manages in a way that it is not aware of?
e.g. what stops the modifications getting blown away the next time npm updates the byteballcore dependency?
is there any way that network details could be passed through at startup?