Fixed up rmdir call and moved over to mkdirp for folder creation