Fix issue #122, Directory upload doesn't work