Generate test directory and file