ftpserver.pl: Reworked fix from commit 7a36b2abc06862