Correct test function I/O path, use mkdir to create doc