fixed error for uploading entire directories