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

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