Fix single file upload.

This fixes single file uploads. Used to reference 'path' but it is only defined if source is a directory. Not that useful in production but indispensable during development.