/**
* Makes sure that the directory exists, by creating it if necessary.
*/
public void mkdirs(String path, int posixPermission) throws IOException {
SFTPv3FileAttributes atts = _stat(path);
if (atts!=null && atts.isDirectory())
return;
int idx = path.lastIndexOf("/");
if (idx>0)
mkdirs(path.substring(0,idx), posixPermission);