Version that works with running hive query remotely on server. Base64 encoding locally + writing to file on remote before invoking hive.