Changed permissions for mkdir to octal, since that is how ssh2 treats the permissions number.