New option mkpath

When mkpath is true it will create the directory path if it does not exists.