From what you are describing, your config.php file should have these settings:
$WA_EditorRemoteRoot = '/';
and
$Config['UserFilesPath'] = 'up/';
and your configuration.php should have these settings:
$WA_EditorRemoteRoot = '/test/';
and
$kfm_userfiles_output = 'up/';
if you are still having issues, please attach your config.php and configuration.php files to further look at the issue.