remove hdfs usage in runRemoteScript and related RetentionTest fixes