SFTP: Don't do stat if lstat fails
SFTP: CS adjustment
SFTP: Revamp file type detection and add truncate method

Also clean up some code
Merge pull request #10 from phpseclib/master

Sync