add layer test case

moved mkdir() method to IoUtils to ensure the directory hierarchy always
exists before writing cumulative and references files