Ensured that external program was stopped in index_test.
Fixed issue where `nested` leveldbs were being created in tests.