Better testing setup.

- Added test.sh using nose with coverage support.
- Added test for tree's __getitem__