Fix su and hdfs -put issues with hdfs upload script

This commit fixes the sudo and file replacement issues described in ticket #154