Convert tree_pk.test.lua to  the new lua console and data dictionary.

Fix a bug with missing tonumber() in space:select_range().