From what I read in the documentation, looks like the script automatically creates a /YEAR/MONTH/ folder structure. But what if that option is disabled (as I always do for non-blog websites)?
So probably the get_wp_uploads_directory() function should use wp_upload_dir() function to check for the current site folder structure.