Create local folders if parent path doesn't exist

Previously it will fail to create the local data folder, if the parent path doesn't exist.