Update so that it can be called direct from other node scripts. Update README to reflect usage.