Bugfix

Hi, I've fixed some bugs that I have encountered trying to sync a folder on my FTP server from a Windows system. Sorry, I don't have time to write tests for it.