Fix root folder and add cache_dir option for cached uploads.