ISSUE#316. Updated to handle new file and directory uploads.