Use os.sep instead of hardcoded '/' when splitting the relative path,
and clarify the invalid path error message.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The clean_path function constructs file paths by joining path components without validating that the resulting path stays within the intended USERDATA directory
Addresses CWE-22