Fixed permission check for DatasetParameterSets, fixed bug in temp-dir file uploads