Eliminate redundant newFolder calls when uploading multiple files to the same directory; miscellaneous cleanup.