Improved permission detection when using ftp backend

Added the same improvements when using the ftp backend that allow better permission checking when on POSIX systems.
Basically adapted the patch from here: http://pyd.io/f/topic/solved-linux-acl-folder-not-writeable/

If applicable, copyright goes to the projec..