Fixed bugs in hive.py

Fixed two bugs:

1. If parent_dir was empty, the exists check for the parent_dir would fail.
2. HiveExternalTask was calling the ctors of HivePartitionTarget and HiveTableTarget in the wrong order.