Better tests for object.js ; Reversed object.js.

Reverted latest pull-request fixing regexp issue as it caused breakage of basic functionality.
Wrote test which should protect from such problems in the future.