Fix localid()

If you let `locked` generate an id for you, you currently get an undefined result from `Node.prototype.localid`.
Merge pull request #3 from samcday/patch-2

Fix localid()