Fix bug found in file upload test (see also issue #36)