Fix indexing logic

An incorrect folder variable was used for the purpose of indexing a
project via external commands.

This fixes #116. It also fixes #117.