Fix: URL encode strings before sending to FTP server. This prevents files with spaces in their names from failing.