Added utility to check/create a folder for output.