fix undefined options and user-defined uploadpath

Allow users to upload to a specific subdirectory by exposing an `uploadPath` option.

Also this contains a minor bugfix in case the options argument is not passed.