Fixed ProfileClient and associated tests; fixed HDInsight tests