Added support for distinguishing folders from files. No folder upload support - must be copied to files directory manually.