modified for compatibility with hive 0.7.1 from cdh 3u3, also now works for fetchtask output to CLI console