Use "dir" instead of "folder" or "path"

This mainly changes config names, but also fixes some other uses of `path` and all uses of `folder` throughout the code and tests.