[lib] fileupload: fixed 'parent_dir' bug