Ftp support

FTP support added. merge with master.