the configuration.php file is the file that sets the upload directory.
you have the following code that is using the $_SESSION['userid']; variable:
if (isset($_SESSION['userid'])) {
$kfm_userfiles_address .= "/".$_SESSION['userid'];
forst, double check that userid is the correct session name to be using. Open the login page, double click the Authenticate user server behavior and go to the third page to check the name of the id session that is created.
next, try changing the code in the configuration.php page to:
@session_start();
if (isset($_SESSION['userid'])) {
$kfm_userfiles_address .= "/".$_SESSION['userid'];