Bugfix for uploading directories