fix incorrect update of local variables, fix wrong env returned

- fix wrong value updated on stack when updating a variable
- fix env not discarded upon exiting a block
- add error message for reporting interpreter state that could not occur
add tests
update scalatest to 2.1.2