Add support for using projectile to find the project root, optionally

I ran into this when working on cpython itself; it turns out that the Lib directory doesn't have __init__.py in it.

So, given that projectile exists anyway, why not use it if it's available? Hence, this.

It should work fine without projectile enabled, as well.