Add dependencies and fix HDFS directory creation