fix #1, make directories recursively. Add mkdir_p to util.