New string prototype method and object lock fix.

* Added `format()` method to string prototype. Closes #13 @Phrohdoh 
* Locked objects may not be modified in any way so as to be consistent with the behaviour of the `clear()` and `add()` prototype methods.