Command line RethinkDB to JSON backup and restore script built in Node.js