Use isFile and isDirectory.
Change specs to match code.
Missed an instanceof check.
Actually use the genericCallback.
Create the target container before you upload.