Add HDFS compatible FS unit tests; fix issues detected by unit tests