ws: use mkstemp() rather than mktemp()

Avoid using mktemp() at all, even if this function is just temporary itself until libssh provides the functionality.