Set LD_LIBRARY_PATH in the json-test makefile. This should solve bug 823322.

I'm not sure where that makefile comes from. If something generates it, we should fix this at the source.
Fix for failing tests due to not being able to locate libtrilite.so
Second attempt to fix "make test"
Make sure build is run before attempting to test.
Fix libtrilite not getting built on test.

(Ripped off from abbeyj's pull req)
Merge abbeyj's LD_LIBRARY_PATH fixes in. I like his relative paths better.
Make the tests pass on Jenkins (once it has the Virtualbox kernel module loaded).