Moved some code from build_lsp_leveldb.py to utils.py