Fixes to hive scripts so they actually run on the cluster with HDFS.
FINAL FIXES on hive script. I'll work no more.