Fixed handling of recursive directory upload.